OrganComponent.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using Content.Shared.Body.Systems;
  2. using Robust.Shared.Containers;
  3. using Robust.Shared.GameStates;
  4. using Robust.Shared.Prototypes; // Shitmed Change
  5. using Content.Shared._Shitmed.Medical.Surgery; // Shitmed Change
  6. using Content.Shared._Shitmed.Medical.Surgery.Tools; // Shitmed Change
  7. namespace Content.Shared.Body.Organ;
  8. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  9. [Access(typeof(SharedBodySystem), typeof(SharedSurgerySystem))]
  10. public sealed partial class OrganComponent : Component, ISurgeryToolComponent // Shitmed Change
  11. {
  12. /// <summary>
  13. /// Relevant body this organ is attached to.
  14. /// </summary>
  15. [DataField, AutoNetworkedField]
  16. public EntityUid? Body;
  17. /// <summary>
  18. /// Shitmed Change:Relevant body this organ originally belonged to.
  19. /// FOR WHATEVER FUCKING REASON AUTONETWORKING THIS CRASHES GIBTEST AAAAAAAAAAAAAAA
  20. /// </summary>
  21. [DataField]
  22. public EntityUid? OriginalBody;
  23. // Shitmed Change Start
  24. /// <summary>
  25. /// Shitmed Change: Shitcodey solution to not being able to know what name corresponds to each organ's slot ID
  26. /// without referencing the prototype or hardcoding.
  27. /// </summary>
  28. [DataField]
  29. public string SlotId = string.Empty;
  30. [DataField]
  31. public string ToolName { get; set; } = "An organ";
  32. [DataField]
  33. public float Speed { get; set; } = 1f;
  34. /// <summary>
  35. /// Shitmed Change: If true, the organ will not heal an entity when transplanted into them.
  36. /// </summary>
  37. [DataField, AutoNetworkedField]
  38. public bool? Used { get; set; }
  39. /// <summary>
  40. /// When attached, the organ will ensure these components on the entity, and delete them on removal.
  41. /// </summary>
  42. [DataField]
  43. public ComponentRegistry? OnAdd;
  44. /// <summary>
  45. /// When removed, the organ will ensure these components on the entity, and delete them on insertion.
  46. /// </summary>
  47. [DataField]
  48. public ComponentRegistry? OnRemove;
  49. /// <summary>
  50. /// Is this organ working or not?
  51. /// </summary>
  52. [DataField, AutoNetworkedField]
  53. public bool Enabled = true;
  54. /// <summary>
  55. /// Can this organ be enabled or disabled? Used mostly for prop, damaged or useless organs.
  56. /// </summary>
  57. [DataField]
  58. public bool CanEnable = true;
  59. // Shitmed Change End
  60. }