CloningPodComponent.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using Content.Shared.DeviceLinking;
  2. using Content.Shared.Materials;
  3. using Robust.Shared.Audio;
  4. using Robust.Shared.Containers;
  5. using Robust.Shared.Prototypes;
  6. using Robust.Shared.Serialization;
  7. namespace Content.Shared.Cloning;
  8. [RegisterComponent]
  9. public sealed partial class CloningPodComponent : Component
  10. {
  11. [DataField]
  12. public ProtoId<SinkPortPrototype> PodPort = "CloningPodReceiver";
  13. [ViewVariables]
  14. public ContainerSlot BodyContainer = default!;
  15. /// <summary>
  16. /// How long the cloning has been going on for.
  17. /// </summary>
  18. [ViewVariables]
  19. public float CloningProgress = 0;
  20. [ViewVariables]
  21. public int UsedBiomass = 70;
  22. [ViewVariables]
  23. public bool FailedClone = false;
  24. /// <summary>
  25. /// The material that is used to clone entities.
  26. /// </summary>
  27. [DataField]
  28. public ProtoId<MaterialPrototype> RequiredMaterial = "Biomass";
  29. /// <summary>
  30. /// The current amount of time it takes to clone a body.
  31. /// </summary>
  32. [DataField]
  33. public float CloningTime = 30f;
  34. /// <summary>
  35. /// The mob to spawn on emag.
  36. /// </summary>
  37. [DataField]
  38. public EntProtoId MobSpawnId = "MobAbomination";
  39. /// <summary>
  40. /// The sound played when a mob is spawned from an emagged cloning pod.
  41. /// </summary>
  42. [DataField]
  43. public SoundSpecifier ScreamSound = new SoundCollectionSpecifier("ZombieScreams")
  44. {
  45. Params = AudioParams.Default.WithVolume(4),
  46. };
  47. [ViewVariables(VVAccess.ReadWrite)]
  48. public CloningPodStatus Status;
  49. [ViewVariables]
  50. public EntityUid? ConnectedConsole;
  51. }
  52. [Serializable, NetSerializable]
  53. public enum CloningPodVisuals : byte
  54. {
  55. Status
  56. }
  57. [Serializable, NetSerializable]
  58. public enum CloningPodStatus : byte
  59. {
  60. Idle,
  61. Cloning,
  62. Gore,
  63. NoMind
  64. }