Refactor actions to be entities with components (#19900)
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user