Fix map yaml linter (#6433)
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Content.Server.Administration.Commands
|
||||
{
|
||||
if (int.TryParse(args[1], out var mapId))
|
||||
{
|
||||
var gameMapEnt = mapLoader.LoadBlueprint(new MapId(mapId), gameMap.MapPath);
|
||||
var gameMapEnt = mapLoader.LoadBlueprint(new MapId(mapId), gameMap.MapPath.ToString());
|
||||
if (gameMapEnt is null)
|
||||
{
|
||||
shell.WriteError($"Failed to create the given game map, is the path {gameMap.MapPath} correct?");
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Content.Server.GameTicking
|
||||
_pauseManager.AddUninitializedMap(toLoad);
|
||||
}
|
||||
|
||||
_mapLoader.LoadMap(toLoad, map.MapPath);
|
||||
_mapLoader.LoadMap(toLoad, map.MapPath.ToString());
|
||||
|
||||
var grids = _mapManager.GetAllMapGrids(toLoad).ToList();
|
||||
var dict = new Dictionary<string, StationId>();
|
||||
|
||||
@@ -5,6 +5,7 @@ using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.Maps;
|
||||
|
||||
@@ -52,7 +53,7 @@ public class GameMapPrototype : IPrototype
|
||||
/// Relative directory path to the given map, i.e. `Maps/saltern.yml`
|
||||
/// </summary>
|
||||
[DataField("mapPath", required: true)]
|
||||
public string MapPath { get; } = default!;
|
||||
public ResourcePath MapPath { get; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Controls if the map can be used as a fallback if no maps are eligible.
|
||||
|
||||
@@ -3,6 +3,8 @@ using System.Linq;
|
||||
using Content.Server.Objectives.Interfaces;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Salvage
|
||||
@@ -19,7 +21,7 @@ namespace Content.Server.Salvage
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("mapPath", required: true)]
|
||||
public string MapPath { get; } = default!;
|
||||
public ResourcePath MapPath { get; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Size *from 0,0* in units of the map (used to determine if it fits)
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace Content.Server.Salvage
|
||||
Report("salvage-system-announcement-spawn-no-debris-available");
|
||||
return false;
|
||||
}
|
||||
var bp = _mapLoader.LoadBlueprint(spl.MapId, map.MapPath);
|
||||
var bp = _mapLoader.LoadBlueprint(spl.MapId, map.MapPath.ToString());
|
||||
if (bp == null)
|
||||
{
|
||||
Report("salvage-system-announcement-spawn-debris-disintegrated");
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Content.Server.Weapon.Ranged.Ammunition.Components
|
||||
[DataField("ammoVelocity")]
|
||||
public float Velocity { get; } = 20f;
|
||||
|
||||
[DataField("muzzleFlash", customTypeSerializer:typeof(ResourcePathSerializer))]
|
||||
[DataField("muzzleFlash")]
|
||||
public ResourcePath? MuzzleFlashSprite = new("Objects/Weapons/Guns/Projectiles/bullet_muzzle.png");
|
||||
|
||||
[DataField("soundCollectionEject")]
|
||||
|
||||
Reference in New Issue
Block a user