CivFactionsComponent.cs 808 B

12345678910111213141516171819202122232425
  1. using System;
  2. using Content.Shared.Clothing.Components;
  3. using Robust.Shared.GameObjects;
  4. using Robust.Shared.GameStates;
  5. using Robust.Shared.Serialization;
  6. using Robust.Shared.Serialization.Manager.Attributes;
  7. namespace Content.Shared.Civ14.CivFactions;
  8. [AutoGenerateComponentState] // Add this attribute
  9. [RegisterComponent]
  10. [NetworkedComponent]
  11. public sealed partial class CivFactionsComponent : Component
  12. {
  13. /// <summary>
  14. /// The list of current factions in the game.
  15. /// </summary>
  16. [DataField("factionList"), AutoNetworkedField]
  17. public List<FactionData> FactionList { get; set; } = new(); // <-- Use FactionData
  18. /// <summary>
  19. /// Check if the faction rule is enabled.
  20. /// </summary>
  21. [DataField("factionsActive")]
  22. public bool FactionsActive { get; set; } = true;
  23. }