NPCJukeComponent.cs 885 B

12345678910111213141516171819202122232425262728293031323334
  1. using Content.Server.NPC.HTN.PrimitiveTasks.Operators.Combat;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  3. namespace Content.Server.NPC.Components;
  4. [RegisterComponent, AutoGenerateComponentPause]
  5. public sealed partial class NPCJukeComponent : Component
  6. {
  7. [DataField("jukeType")]
  8. public JukeType JukeType = JukeType.Away;
  9. [DataField("jukeDuration")]
  10. public float JukeDuration = 0.5f;
  11. [DataField("nextJuke", customTypeSerializer:typeof(TimeOffsetSerializer))]
  12. [AutoPausedField]
  13. public TimeSpan NextJuke;
  14. [DataField("targetTile")]
  15. public Vector2i? TargetTile;
  16. }
  17. public enum JukeType : byte
  18. {
  19. /// <summary>
  20. /// Will move directly away from target if applicable.
  21. /// </summary>
  22. Away,
  23. /// <summary>
  24. /// Move to the adjacent tile for the specified duration.
  25. /// </summary>
  26. AdjacentTile
  27. }