Action container rejig (#20260)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Leon Friedrich
2023-09-23 04:49:39 -04:00
committed by GitHub
parent c80c90ed65
commit 684b334806
50 changed files with 889 additions and 740 deletions

View File

@@ -9,13 +9,10 @@ namespace Content.Shared.Actions;
public sealed partial class ActionsComponent : Component
{
/// <summary>
/// Handled on the client to track added and removed actions.
/// List of actions currently granted to this entity.
/// On the client, this may contain a mixture of client-side and networked entities.
/// </summary>
[ViewVariables] public readonly Dictionary<EntityUid, ActionMetaData> OldClientActions = new();
[ViewVariables] public readonly HashSet<EntityUid> Actions = new();
public override bool SendOnlyToOwner => true;
[DataField] public HashSet<EntityUid> Actions = new();
}
[Serializable, NetSerializable]
@@ -29,7 +26,7 @@ public sealed class ActionsComponentState : ComponentState
}
}
public readonly record struct ActionMetaData(bool ClientExclusive, bool AutoRemove);
public readonly record struct ActionMetaData(bool ClientExclusive);
/// <summary>
/// Determines how the action icon appears in the hotbar for item actions.