1
0

ContrabandComponent.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using Content.Shared.Roles;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Shared.Contraband;
  5. /// <summary>
  6. /// This is used for marking entities that are considered 'contraband' IC and showing it clearly in examine.
  7. /// </summary>
  8. [RegisterComponent, NetworkedComponent, Access(typeof(ContrabandSystem)), AutoGenerateComponentState]
  9. public sealed partial class ContrabandComponent : Component
  10. {
  11. /// <summary>
  12. /// The degree of contraband severity this item is considered to have.
  13. /// </summary>
  14. [DataField]
  15. [AutoNetworkedField]
  16. public ProtoId<ContrabandSeverityPrototype> Severity = "Restricted";
  17. /// <summary>
  18. /// Which departments is this item restricted to?
  19. /// By default, command and sec are assumed to be fine with contraband.
  20. /// If null, no departments are allowed to use this.
  21. /// </summary>
  22. [DataField]
  23. [AutoNetworkedField]
  24. public HashSet<ProtoId<DepartmentPrototype>> AllowedDepartments = new();
  25. /// <summary>
  26. /// Which jobs is this item restricted to?
  27. /// If empty, no jobs are allowed to use this beyond the allowed departments.
  28. /// </summary>
  29. [DataField]
  30. [AutoNetworkedField]
  31. public HashSet<ProtoId<JobPrototype>> AllowedJobs = new();
  32. }