Remove dice spam (#6941)

Co-authored-by: fishfish458 <fishfish458>
This commit is contained in:
Fishfish458
2022-02-28 20:18:36 -06:00
committed by GitHub
parent 103964ca04
commit 86925774f2

View File

@@ -25,7 +25,7 @@ namespace Content.Server.Dice
base.Initialize();
SubscribeLocalEvent<DiceComponent, ComponentInit>(OnComponentInit);
SubscribeLocalEvent<DiceComponent, ActivateInWorldEvent>(OnActivate);
SubscribeLocalEvent<DiceComponent, UseInHandEvent>(OnUseInHand);
SubscribeLocalEvent<DiceComponent, LandEvent>(OnLand);
SubscribeLocalEvent<DiceComponent, ExaminedEvent>(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);
}