1
0

SubdermalImplantComponent.cs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. using Content.Shared.Actions;
  2. using Content.Shared.Whitelist;
  3. using Robust.Shared.GameStates;
  4. using Robust.Shared.Prototypes;
  5. namespace Content.Shared.Implants.Components;
  6. /// <summary>
  7. /// Subdermal implants get stored in a container on an entity and grant the entity special actions
  8. /// The actions can be activated via an action, a passive ability (ie tracking), or a reactive ability (ie on death) or some sort of combination
  9. /// They're added and removed with implanters
  10. /// </summary>
  11. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  12. public sealed partial class SubdermalImplantComponent : Component
  13. {
  14. /// <summary>
  15. /// Used where you want the implant to grant the owner an instant action.
  16. /// </summary>
  17. [ViewVariables(VVAccess.ReadWrite)]
  18. [DataField("implantAction")]
  19. public EntProtoId? ImplantAction;
  20. [DataField, AutoNetworkedField]
  21. public EntityUid? Action;
  22. /// <summary>
  23. /// The entity this implant is inside
  24. /// </summary>
  25. [ViewVariables, AutoNetworkedField]
  26. public EntityUid? ImplantedEntity;
  27. /// <summary>
  28. /// Should this implant be removeable?
  29. /// </summary>
  30. [ViewVariables(VVAccess.ReadWrite)]
  31. [DataField("permanent"), AutoNetworkedField]
  32. public bool Permanent = false;
  33. /// <summary>
  34. /// Target whitelist for this implant specifically.
  35. /// Only checked if the implanter allows implanting on the target to begin with.
  36. /// </summary>
  37. [DataField]
  38. public EntityWhitelist? Whitelist;
  39. /// <summary>
  40. /// Target blacklist for this implant specifically.
  41. /// Only checked if the implanter allows implanting on the target to begin with.
  42. /// </summary>
  43. [DataField]
  44. public EntityWhitelist? Blacklist;
  45. /// <summary>
  46. /// If set, this ProtoId is used when attempting to draw the implant instead.
  47. /// Useful if the implant is a child to another implant and you don't want to differentiate between them when drawing.
  48. /// </summary>
  49. [DataField]
  50. public EntProtoId? DrawableProtoIdOverride;
  51. }
  52. /// <summary>
  53. /// Used for opening the storage implant via action.
  54. /// </summary>
  55. public sealed partial class OpenStorageImplantEvent : InstantActionEvent
  56. {
  57. }
  58. public sealed partial class UseFreedomImplantEvent : InstantActionEvent
  59. {
  60. }
  61. /// <summary>
  62. /// Used for triggering trigger events on the implant via action
  63. /// </summary>
  64. public sealed partial class ActivateImplantEvent : InstantActionEvent
  65. {
  66. }
  67. /// <summary>
  68. /// Used for opening the uplink implant via action.
  69. /// </summary>
  70. public sealed partial class OpenUplinkImplantEvent : InstantActionEvent
  71. {
  72. }
  73. public sealed partial class UseScramImplantEvent : InstantActionEvent
  74. {
  75. }
  76. public sealed partial class UseDnaScramblerImplantEvent : InstantActionEvent
  77. {
  78. }