From 86925774f2502ddcddef0cd302eacae2b3a3bd0c Mon Sep 17 00:00:00 2001 From: Fishfish458 <47410468+Fishfish458@users.noreply.github.com> Date: Mon, 28 Feb 2022 20:18:36 -0600 Subject: [PATCH] Remove dice spam (#6941) Co-authored-by: fishfish458 --- Content.Server/Dice/DiceSystem.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Content.Server/Dice/DiceSystem.cs b/Content.Server/Dice/DiceSystem.cs index e373c4f6fc..cd8753210b 100644 --- a/Content.Server/Dice/DiceSystem.cs +++ b/Content.Server/Dice/DiceSystem.cs @@ -25,7 +25,7 @@ namespace Content.Server.Dice base.Initialize(); SubscribeLocalEvent(OnComponentInit); - SubscribeLocalEvent(OnActivate); + SubscribeLocalEvent(OnUseInHand); SubscribeLocalEvent(OnLand); SubscribeLocalEvent(OnExamined); } @@ -36,8 +36,11 @@ namespace Content.Server.Dice component.CurrentSide = component.Sides; } - private void OnActivate(EntityUid uid, DiceComponent component, ActivateInWorldEvent args) + private void OnUseInHand(EntityUid uid, DiceComponent component, UseInHandEvent args) { + if (args.Handled) return; + + args.Handled = true; Roll(uid, component); }