1
0

MobStateActionsComponent.cs 853 B

1234567891011121314151617181920212223242526272829
  1. using Content.Shared.Mobs.Systems;
  2. namespace Content.Shared.Mobs.Components;
  3. /// <summary>
  4. /// Used for specifying actions that should be automatically added/removed on mob state transitions
  5. /// </summary>
  6. /// <remarks>
  7. /// Mostly for crit-specific actions.
  8. /// </remarks>
  9. /// <see cref="MobStateActionsSystem"/>
  10. [RegisterComponent]
  11. public sealed partial class MobStateActionsComponent : Component
  12. {
  13. /// <summary>
  14. /// Specifies a list of actions that should be available if a mob is in a given state.
  15. /// </summary>
  16. /// <example>
  17. /// actions:
  18. /// Critical:
  19. /// - ActionCritSuccumb
  20. /// Alive:
  21. /// - ActionAnimalLayEgg
  22. /// </example>
  23. [DataField("actions")]
  24. public Dictionary<MobState, List<string>> Actions = new();
  25. [DataField] public List<EntityUid> GrantedActions = new();
  26. }