UseInHandEvent cleanup (#35231)

This commit is contained in:
slarticodefast
2025-02-18 13:27:30 +01:00
committed by GitHub
parent e09ef5aa6f
commit d171057680
9 changed files with 45 additions and 25 deletions

View File

@@ -76,14 +76,13 @@ public sealed class GasAnalyzerSystem : EntitySystem
/// </summary>
private void OnUseInHand(Entity<GasAnalyzerComponent> entity, ref UseInHandEvent args)
{
// Not checking for Handled because ActivatableUISystem already marks it as such.
if (!entity.Comp.Enabled)
{
ActivateAnalyzer(entity, args.User);
}
else
{
DisableAnalyzer(entity, args.User);
}
args.Handled = true;
}