using System.IO; using Content.Server.Maps; using Robust.Shared.Prototypes; using Robust.Shared.Utility; namespace Content.MapRenderer; /// /// A single target map that the map renderer should render. /// /// /// public abstract class RenderMap { /// /// Short identifier of the map that should be unique-ish. Used in file names and other important stuff. /// public abstract string ShortName { get; } } /// /// Specifies a map prototype that the map renderer should render. /// public sealed class RenderMapPrototype : RenderMap { /// /// The ID of the prototype to render. /// public required ProtoId Prototype; public override string ShortName => Prototype; public override string ToString() { return $"{nameof(RenderMapPrototype)}({Prototype})"; } } /// /// Specifies a map file on disk that the map renderer should render. /// public sealed class RenderMapFile : RenderMap { /// /// The path to the file that should be rendered. This is an OS disk path, *not* a . /// public required string FileName; public override string ShortName => Path.GetFileNameWithoutExtension(FileName); public override string ToString() { return $"{nameof(RenderMapFile)}({FileName})"; } }