MMIComponent.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using Content.Shared.Containers.ItemSlots;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Serialization;
  4. namespace Content.Shared.Silicons.Borgs.Components;
  5. /// <summary>
  6. /// This is used for an entity that takes a brain
  7. /// in an item slot before transferring consciousness.
  8. /// Used for borg stuff.
  9. /// </summary>
  10. [RegisterComponent, NetworkedComponent, Access(typeof(SharedBorgSystem))]
  11. public sealed partial class MMIComponent : Component
  12. {
  13. /// <summary>
  14. /// The ID of the itemslot that holds the brain.
  15. /// </summary>
  16. [DataField("brainSlotId")]
  17. public string BrainSlotId = "brain_slot";
  18. /// <summary>
  19. /// The <see cref="ItemSlot"/> for this implanter
  20. /// </summary>
  21. [ViewVariables(VVAccess.ReadWrite)]
  22. public ItemSlot BrainSlot = default!;
  23. /// <summary>
  24. /// The sprite state when the brain inserted has a mind.
  25. /// </summary>
  26. [DataField("hasMindState")]
  27. public string HasMindState = "mmi_alive";
  28. /// <summary>
  29. /// The sprite state when the brain inserted doesn't have a mind.
  30. /// </summary>
  31. [DataField("noMindState")]
  32. public string NoMindState = "mmi_dead";
  33. /// <summary>
  34. /// The sprite state when there is no brain inserted.
  35. /// </summary>
  36. [DataField("noBrainState")]
  37. public string NoBrainState = "mmi_off";
  38. }
  39. [Serializable, NetSerializable]
  40. public enum MMIVisuals : byte
  41. {
  42. BrainPresent,
  43. HasMind
  44. }
  45. [Serializable, NetSerializable]
  46. public enum MMIVisualLayers : byte
  47. {
  48. Brain,
  49. Base
  50. }