using Content.Server.Station; using JetBrains.Annotations; using Robust.Shared.Prototypes; using Robust.Shared.Utility; using System.Diagnostics; using System.Numerics; namespace Content.Server.Maps; /// /// Prototype data for a game map. /// /// /// Forks should not directly edit existing parts of this class. /// Make a new partial for your fancy new feature, it'll save you time later. /// [Prototype, PublicAPI] [DebuggerDisplay("GameMapPrototype [{ID} - {MapName}]")] public sealed partial class GameMapPrototype : IPrototype { /// [IdDataField] public string ID { get; private set; } = default!; [DataField] public float MaxRandomOffset = 1000f; /// /// Turns out some of the map files are actually secretly grids. Excellent. I love map loading code. /// [DataField] public bool IsGrid; [DataField] public bool RandomRotation = true; /// /// Name of the map to use in generic messages, like the map vote. /// [DataField(required: true)] public string MapName { get; private set; } = default!; /// /// Relative directory path to the given map, i.e. `/Maps/saltern.yml` /// [DataField(required: true)] public ResPath MapPath { get; private set; } = default!; /// /// If this map requires a specific preset /// [DataField("fixedPreset")] public string FixedPreset { get; private set; } = "Nomads"; [DataField("stations", required: true)] private Dictionary _stations = new(); /// /// The stations this map contains. The names should match with the BecomesStation components. /// public IReadOnlyDictionary Stations => _stations; /// /// Performs a shallow clone of this map prototype, replacing MapPath with the argument. /// public GameMapPrototype Persistence(ResPath mapPath) { return new() { ID = ID, MapName = MapName, MapPath = mapPath, _stations = _stations }; } }