Make use-in-hand default to activation interactions. (#5951)

This commit is contained in:
Leon Friedrich
2022-01-05 02:23:01 +13:00
committed by GitHub
parent c4512e3c1a
commit f13f743c51
18 changed files with 58 additions and 116 deletions

View File

@@ -24,7 +24,6 @@ namespace Content.Server.PDA
base.Initialize();
SubscribeLocalEvent<PDAComponent, ActivateInWorldEvent>(OnActivateInWorld);
SubscribeLocalEvent<PDAComponent, UseInHandEvent>(OnUse);
SubscribeLocalEvent<PDAComponent, LightToggleEvent>(OnLightToggle);
}
@@ -37,15 +36,6 @@ namespace Content.Server.PDA
ui.OnReceiveMessage += (msg) => OnUIMessage(pda, msg);
}
private void OnUse(EntityUid uid, PDAComponent pda, UseInHandEvent args)
{
if (args.Handled)
return;
args.Handled = OpenUI(pda, args.User);
}
private void OnActivateInWorld(EntityUid uid, PDAComponent pda, ActivateInWorldEvent args)
{
if (args.Handled)