Refactor actions to be entities with components (#19900)

This commit is contained in:
DrSmugleaf
2023-09-08 18:16:05 -07:00
committed by GitHub
parent e18f731b91
commit c71f97e3a2
210 changed files with 10693 additions and 11714 deletions

View File

@@ -1,6 +1,6 @@
using Content.Server.Actions;
using Content.Shared.Actions;
using JetBrains.Annotations;
using Content.Shared.UserInterface;
using Robust.Server.GameObjects;
namespace Content.Server.UserInterface;
@@ -28,7 +28,7 @@ public sealed class IntrinsicUISystem : EntitySystem
foreach (var entry in component.UIs)
{
_actionsSystem.AddAction(uid, entry.ToggleAction, null, actions);
_actionsSystem.AddAction(uid, ref entry.ToggleActionEntity, entry.ToggleAction, null, actions);
}
}
@@ -68,13 +68,6 @@ public sealed class IntrinsicUISystem : EntitySystem
}
}
[UsedImplicitly]
public sealed partial class ToggleIntrinsicUIEvent : InstantActionEvent
{
[ViewVariables]
public Enum? Key { get; set; }
}
// Competing with ActivatableUI for horrible event names.
public sealed class IntrinsicUIOpenAttemptEvent : CancellableEntityEventArgs
{