1
0

FactionClothingComponent.cs 856 B

123456789101112131415161718192021222324252627
  1. using Content.Shared.Clothing.EntitySystems;
  2. using Content.Shared.NPC.Prototypes;
  3. using Robust.Shared.GameStates;
  4. using Robust.Shared.Prototypes;
  5. namespace Content.Shared.Clothing.Components;
  6. /// <summary>
  7. /// When equipped, adds the wearer to a faction.
  8. /// When removed, removes the wearer from a faction.
  9. /// </summary>
  10. [RegisterComponent, NetworkedComponent, Access(typeof(FactionClothingSystem))]
  11. public sealed partial class FactionClothingComponent : Component
  12. {
  13. /// <summary>
  14. /// Faction to add and remove.
  15. /// </summary>
  16. [DataField(required: true)]
  17. public ProtoId<NpcFactionPrototype> Faction = string.Empty;
  18. /// <summary>
  19. /// If true, the wearer was already part of the faction.
  20. /// This prevents wrongly removing them after removing the item.
  21. /// </summary>
  22. [DataField]
  23. public bool AlreadyMember;
  24. }