2023-08-11 22:56:34 -07:00
|
|
|
|
using Content.Shared.Mobs.Systems;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Mobs.Components;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Used for specifying actions that should be automatically added/removed on mob state transitions
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// Mostly for crit-specific actions.
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
/// <see cref="MobStateActionsSystem"/>
|
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class MobStateActionsComponent : Component
|
2023-08-11 22:56:34 -07:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Specifies a list of actions that should be available if a mob is in a given state.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <example>
|
|
|
|
|
|
/// actions:
|
|
|
|
|
|
/// Critical:
|
2023-09-08 18:16:05 -07:00
|
|
|
|
/// - ActionCritSuccumb
|
2023-08-11 22:56:34 -07:00
|
|
|
|
/// Alive:
|
2023-09-08 18:16:05 -07:00
|
|
|
|
/// - ActionAnimalLayEgg
|
2023-08-11 22:56:34 -07:00
|
|
|
|
/// </example>
|
|
|
|
|
|
[DataField("actions")]
|
|
|
|
|
|
public Dictionary<MobState, List<string>> Actions = new();
|
2023-09-23 04:49:39 -04:00
|
|
|
|
|
|
|
|
|
|
[DataField] public List<EntityUid> GrantedActions = new();
|
2023-08-11 22:56:34 -07:00
|
|
|
|
}
|