1
0

WorldControllerComponent.cs 891 B

12345678910111213141516171819202122232425
  1. using Content.Server.Worldgen.Systems;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  4. namespace Content.Server.Worldgen.Components;
  5. /// <summary>
  6. /// This is used for controlling overall world loading, containing an index of all chunks in the map.
  7. /// </summary>
  8. [RegisterComponent]
  9. [Access(typeof(WorldControllerSystem))]
  10. public sealed partial class WorldControllerComponent : Component
  11. {
  12. /// <summary>
  13. /// The prototype to use for chunks on this world map.
  14. /// </summary>
  15. [DataField("chunkProto", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
  16. public string ChunkProto = "WorldChunk";
  17. /// <summary>
  18. /// An index of chunks owned by the controller.
  19. /// </summary>
  20. [DataField("chunks")] public Dictionary<Vector2i, EntityUid> Chunks = new();
  21. }