* Rejig Actions * fix merge errors * lambda-b-gon * fix PAI, add innate actions * Revert "fix PAI, add innate actions" This reverts commit 4b501ac083e979e31ebd98d7b98077e0dbdd344b. * Just fix by making nullable. if only require: true actually did something somehow. * Make AddActions() ensure an actions component and misc comments * misc cleanup * Limit range even when not checking for obstructions * remove old guardian code * rename function and make EntityUid nullable * fix magboot bug * fix action search menu * make targeting toggle all equivalent actions * fix combat popups (enabling <-> disabling)
47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
using Content.Shared.Actions.ActionTypes;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Actions;
|
|
|
|
[NetworkedComponent]
|
|
[RegisterComponent]
|
|
[Friend(typeof(SharedActionsSystem))]
|
|
public sealed class ActionsComponent : Component
|
|
{
|
|
[ViewVariables]
|
|
public SortedSet<ActionType> Actions = new();
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class ActionsComponentState : ComponentState
|
|
{
|
|
public readonly List<ActionType> Actions;
|
|
|
|
public ActionsComponentState(List<ActionType> actions)
|
|
{
|
|
Actions = actions;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Determines how the action icon appears in the hotbar for item actions.
|
|
/// </summary>
|
|
public enum ItemActionIconStyle : byte
|
|
{
|
|
/// <summary>
|
|
/// The default - The item icon will be big with a small action icon in the corner
|
|
/// </summary>
|
|
BigItem,
|
|
|
|
/// <summary>
|
|
/// The action icon will be big with a small item icon in the corner
|
|
/// </summary>
|
|
BigAction,
|
|
|
|
/// <summary>
|
|
/// BigAction but no item icon will be shown in the corner.
|
|
/// </summary>
|
|
NoItem
|
|
}
|