Revert "Actions Rework" (#6888)

This commit is contained in:
Leon Friedrich
2022-02-25 18:55:18 +13:00
committed by GitHub
parent 5ac5dd6a64
commit 49ae383f06
135 changed files with 5165 additions and 3119 deletions

View File

@@ -1,9 +1,10 @@
using Content.Server.Atmos.Components;
using Content.Shared.Actions;
using Content.Shared.Toggleable;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
namespace Content.Server.Atmos.EntitySystems
{
@@ -19,23 +20,6 @@ namespace Content.Server.Atmos.EntitySystems
{
base.Initialize();
SubscribeLocalEvent<GasTankComponent, GetVerbsEvent<ActivationVerb>>(AddOpenUIVerb);
SubscribeLocalEvent<GasTankComponent, GetActionsEvent>(OnGetActions);
SubscribeLocalEvent<GasTankComponent, ToggleActionEvent>(OnActionToggle);
}
private void OnGetActions(EntityUid uid, GasTankComponent component, GetActionsEvent args)
{
args.Actions.Add(component.ToggleAction);
}
private void OnActionToggle(EntityUid uid, GasTankComponent component, ToggleActionEvent args)
{
if (args.Handled)
return;
component.ToggleInternals();
args.Handled = true;
}
private void AddOpenUIVerb(EntityUid uid, GasTankComponent component, GetVerbsEvent<ActivationVerb> args)