1
0

ExecutionComponent.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using Robust.Shared.GameStates;
  2. namespace Content.Shared.Execution;
  3. /// <summary>
  4. /// Added to entities that can be used to execute another target.
  5. /// </summary>
  6. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  7. public sealed partial class ExecutionComponent : Component
  8. {
  9. /// <summary>
  10. /// How long the execution duration lasts.
  11. /// </summary>
  12. [DataField, AutoNetworkedField]
  13. public float DoAfterDuration = 5f;
  14. /// <summary>
  15. /// Arbitrarily chosen number to multiply damage by, used to deal reasonable amounts of damage to a victim of an execution.
  16. /// /// </summary>
  17. [DataField, AutoNetworkedField]
  18. public float DamageMultiplier = 9f;
  19. /// <summary>
  20. /// Shown to the person performing the melee execution (attacker) upon starting a melee execution.
  21. /// </summary>
  22. [DataField]
  23. public LocId InternalMeleeExecutionMessage = "execution-popup-melee-initial-internal";
  24. /// <summary>
  25. /// Shown to bystanders and the victim of a melee execution when a melee execution is started.
  26. /// </summary>
  27. [DataField]
  28. public LocId ExternalMeleeExecutionMessage = "execution-popup-melee-initial-external";
  29. /// <summary>
  30. /// Shown to the attacker upon completion of a melee execution.
  31. /// </summary>
  32. [DataField]
  33. public LocId CompleteInternalMeleeExecutionMessage = "execution-popup-melee-complete-internal";
  34. /// <summary>
  35. /// Shown to bystanders and the victim of a melee execution when a melee execution is completed.
  36. /// </summary>
  37. [DataField]
  38. public LocId CompleteExternalMeleeExecutionMessage = "execution-popup-melee-complete-external";
  39. /// <summary>
  40. /// Shown to the person performing the self execution when starting one.
  41. /// </summary>
  42. [DataField]
  43. public LocId InternalSelfExecutionMessage = "execution-popup-self-initial-internal";
  44. /// <summary>
  45. /// Shown to bystanders near a self execution when one is started.
  46. /// </summary>
  47. [DataField]
  48. public LocId ExternalSelfExecutionMessage = "execution-popup-self-initial-external";
  49. /// <summary>
  50. /// Shown to the person performing a self execution upon completion of a do-after or on use of /suicide with a weapon that has the Execution component.
  51. /// </summary>
  52. [DataField]
  53. public LocId CompleteInternalSelfExecutionMessage = "execution-popup-self-complete-internal";
  54. /// <summary>
  55. /// Shown to bystanders when a self execution is completed or a suicide via execution weapon happens nearby.
  56. /// </summary>
  57. [DataField]
  58. public LocId CompleteExternalSelfExecutionMessage = "execution-popup-self-complete-external";
  59. // Not networked because this is transient inside of a tick.
  60. /// <summary>
  61. /// True if it is currently executing for handlers.
  62. /// </summary>
  63. [DataField]
  64. public bool Executing = false;
  65. }