1
0

LoadMapRuleComponent.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Content.Server.GameTicking.Rules;
  2. using Content.Server.Maps;
  3. using Content.Shared.GridPreloader.Prototypes;
  4. using Robust.Shared.Prototypes;
  5. using Robust.Shared.Utility;
  6. namespace Content.Server.GameTicking.Rules.Components;
  7. /// <summary>
  8. /// This is used for a game rule that loads a map when activated.
  9. /// Works with <see cref="RuleGridsComponent"/>.
  10. /// </summary>
  11. [RegisterComponent, Access(typeof(LoadMapRuleSystem))]
  12. public sealed partial class LoadMapRuleComponent : Component
  13. {
  14. /// <summary>
  15. /// A <see cref="GameMapPrototype"/> to load on a new map.
  16. /// </summary>
  17. [DataField]
  18. public ProtoId<GameMapPrototype>? GameMap;
  19. /// <summary>
  20. /// A map to load.
  21. /// </summary>
  22. [DataField]
  23. public ResPath? MapPath;
  24. /// <summary>
  25. /// A grid to load on a new map.
  26. /// </summary>
  27. [DataField]
  28. public ResPath? GridPath;
  29. /// <summary>
  30. /// A <see cref="PreloadedGridPrototype"/> to move to a new map.
  31. /// If there are no instances left nothing is done.
  32. /// </summary>
  33. [DataField]
  34. public ProtoId<PreloadedGridPrototype>? PreloadedGrid;
  35. }