1
0

NinjaSuitComponent.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using Content.Shared.Actions;
  2. using Content.Shared.Ninja.Systems;
  3. using Robust.Shared.Audio;
  4. using Robust.Shared.GameStates;
  5. using Robust.Shared.Prototypes;
  6. using Robust.Shared.Utility;
  7. namespace Content.Shared.Ninja.Components;
  8. /// <summary>
  9. /// Component for ninja suit abilities and power consumption.
  10. /// As an implementation detail, dashing with katana is a suit action which isn't ideal.
  11. /// </summary>
  12. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  13. [Access(typeof(SharedNinjaSuitSystem))]
  14. public sealed partial class NinjaSuitComponent : Component
  15. {
  16. /// <summary>
  17. /// Sound played when a ninja is hit while cloaked.
  18. /// </summary>
  19. [DataField]
  20. public SoundSpecifier RevealSound = new SoundPathSpecifier("/Audio/Effects/chime.ogg");
  21. /// <summary>
  22. /// ID of the use delay to disable all ninja abilities.
  23. /// </summary>
  24. [DataField]
  25. public string DisableDelayId = "suit_powers";
  26. /// <summary>
  27. /// The action id for recalling a bound energy katana
  28. /// </summary>
  29. [DataField]
  30. public EntProtoId RecallKatanaAction = "ActionRecallKatana";
  31. [DataField, AutoNetworkedField]
  32. public EntityUid? RecallKatanaActionEntity;
  33. /// <summary>
  34. /// Battery charge used per tile the katana teleported.
  35. /// Uses 1% of a default battery per tile.
  36. /// </summary>
  37. [DataField]
  38. public float RecallCharge = 3.6f;
  39. /// <summary>
  40. /// The action id for creating an EMP burst
  41. /// </summary>
  42. [DataField]
  43. public EntProtoId EmpAction = "ActionNinjaEmp";
  44. [DataField, AutoNetworkedField]
  45. public EntityUid? EmpActionEntity;
  46. /// <summary>
  47. /// Battery charge used to create an EMP burst. Can do it 2 times on a small-capacity power cell.
  48. /// </summary>
  49. [DataField]
  50. public float EmpCharge = 180f;
  51. // TODO: EmpOnTrigger bruh
  52. /// <summary>
  53. /// Range of the EMP in tiles.
  54. /// </summary>
  55. [DataField]
  56. public float EmpRange = 6f;
  57. /// <summary>
  58. /// Power consumed from batteries by the EMP
  59. /// </summary>
  60. [DataField]
  61. public float EmpConsumption = 100000f;
  62. /// <summary>
  63. /// How long the EMP effects last for, in seconds
  64. /// </summary>
  65. [DataField]
  66. public float EmpDuration = 60f;
  67. }
  68. public sealed partial class RecallKatanaEvent : InstantActionEvent;
  69. public sealed partial class NinjaEmpEvent : InstantActionEvent;