CartridgeLoaderComponent.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using Content.Shared.Containers.ItemSlots;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.CartridgeLoader;
  4. [RegisterComponent, NetworkedComponent]
  5. public sealed partial class CartridgeLoaderComponent : Component
  6. {
  7. public const string CartridgeSlotId = "Cartridge-Slot";
  8. [DataField]
  9. public ItemSlot CartridgeSlot = new();
  10. /// <summary>
  11. /// List of programs that come preinstalled with this cartridge loader
  12. /// </summary>
  13. [DataField("preinstalled")] // TODO remove this and use container fill.
  14. public List<string> PreinstalledPrograms = new();
  15. /// <summary>
  16. /// The currently running program that has its ui showing
  17. /// </summary>
  18. [ViewVariables(VVAccess.ReadWrite)]
  19. public EntityUid? ActiveProgram = default;
  20. /// <summary>
  21. /// The list of programs running in the background, listening to certain events
  22. /// </summary>
  23. [ViewVariables]
  24. public readonly List<EntityUid> BackgroundPrograms = new();
  25. /// <summary>
  26. /// The maximum amount of programs that can be installed on the cartridge loader entity
  27. /// </summary>
  28. [DataField]
  29. public int DiskSpace = 8;
  30. /// <summary>
  31. /// Controls whether the cartridge loader will play notifications if it supports it at all
  32. /// TODO: Add an option for this to the PDA
  33. /// </summary>
  34. [DataField]
  35. public bool NotificationsEnabled = true;
  36. [DataField(required: true)]
  37. public Enum UiKey = default!;
  38. }