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")]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
nameGenerator:
|
||||
!type:NanotrasenNameGenerator
|
||||
prefixCreator: '14'
|
||||
mapPath: Maps/saltern.yml
|
||||
mapPath: /Maps/saltern.yml
|
||||
minPlayers: 0
|
||||
maxPlayers: 20
|
||||
fallback: true
|
||||
@@ -41,7 +41,7 @@
|
||||
nameGenerator:
|
||||
!type:NanotrasenNameGenerator
|
||||
prefixCreator: 'VG'
|
||||
mapPath: Maps/packedstation.yml
|
||||
mapPath: /Maps/packedstation.yml
|
||||
minPlayers: 15
|
||||
conditions:
|
||||
- !type:HolidayMapCondition
|
||||
@@ -81,7 +81,7 @@
|
||||
nameGenerator:
|
||||
!type:NanotrasenNameGenerator
|
||||
prefixCreator: '14'
|
||||
mapPath: Maps/knightship.yml
|
||||
mapPath: /Maps/knightship.yml
|
||||
minPlayers: 0
|
||||
maxPlayers: 8
|
||||
overflowJobs: []
|
||||
@@ -102,7 +102,7 @@
|
||||
nameGenerator:
|
||||
!type:NanotrasenNameGenerator
|
||||
prefixCreator: '14'
|
||||
mapPath: Maps/ssreach.yml
|
||||
mapPath: /Maps/ssreach.yml
|
||||
minPlayers: 8
|
||||
maxPlayers: 25
|
||||
overflowJobs:
|
||||
@@ -130,7 +130,7 @@
|
||||
nameGenerator:
|
||||
!type:NanotrasenNameGenerator
|
||||
prefixCreator: '14'
|
||||
mapPath: Maps/dart.yml
|
||||
mapPath: /Maps/dart.yml
|
||||
minPlayers: 0
|
||||
votable: false
|
||||
overflowJobs: []
|
||||
@@ -144,7 +144,7 @@
|
||||
nameGenerator:
|
||||
!type:NanotrasenNameGenerator
|
||||
prefixCreator: 'VG'
|
||||
mapPath: Maps/moonrise.yml
|
||||
mapPath: /Maps/moonrise.yml
|
||||
minPlayers: 0
|
||||
votable: false
|
||||
overflowJobs: []
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
nameGenerator:
|
||||
!type:NanotrasenNameGenerator
|
||||
prefixCreator: 'VG'
|
||||
mapPath: Maps/packedstationxmas.yml
|
||||
mapPath: /Maps/packedstationxmas.yml
|
||||
minPlayers: 15
|
||||
conditions:
|
||||
- !type:HolidayMapCondition
|
||||
|
||||
@@ -6,37 +6,37 @@
|
||||
- type: salvageMap
|
||||
id: small1
|
||||
name: "Small / Engineering Storage 1"
|
||||
mapPath: Maps/Salvage/small-1.yml
|
||||
mapPath: /Maps/Salvage/small-1.yml
|
||||
size: 3.5
|
||||
|
||||
- type: salvageMap
|
||||
id: small2
|
||||
name: "Small / Gaming Nook 1"
|
||||
mapPath: Maps/Salvage/small-2.yml
|
||||
mapPath: /Maps/Salvage/small-2.yml
|
||||
size: 3.5
|
||||
|
||||
- type: salvageMap
|
||||
id: small-ship-1
|
||||
name: "Small / Ship 1 (Pill)"
|
||||
mapPath: Maps/Salvage/small-ship-1.yml
|
||||
mapPath: /Maps/Salvage/small-ship-1.yml
|
||||
size: 3.5
|
||||
|
||||
- type: salvageMap
|
||||
id: small3
|
||||
name: "Small / Laundromat 1"
|
||||
mapPath: Maps/Salvage/small-3.yml
|
||||
mapPath: /Maps/Salvage/small-3.yml
|
||||
size: 3.5
|
||||
|
||||
- type: salvageMap
|
||||
id: smallAISurveyDrone
|
||||
name: "Small / AI Survey Drone"
|
||||
mapPath: Maps/Salvage/small-ai-survey-drone.yml
|
||||
mapPath: /Maps/Salvage/small-ai-survey-drone.yml
|
||||
size: 3.5
|
||||
|
||||
- type: salvageMap
|
||||
id: small4
|
||||
name: "Small / Bar Salvage"
|
||||
mapPath: Maps/Salvage/small-4.yml
|
||||
mapPath: /Maps/Salvage/small-4.yml
|
||||
size: 3.5
|
||||
|
||||
# Small - Asteroids
|
||||
@@ -44,7 +44,7 @@
|
||||
- type: salvageMap
|
||||
id: smallA1
|
||||
name: "Small / Asteroid 1 Plasmafire"
|
||||
mapPath: Maps/Salvage/small-a-1.yml
|
||||
mapPath: /Maps/Salvage/small-a-1.yml
|
||||
size: 3.5
|
||||
|
||||
# "Medium"-class maps - Max size square: 15x15, indicated size: 7.5
|
||||
@@ -52,25 +52,25 @@
|
||||
- type: salvageMap
|
||||
id: medium1
|
||||
name: "Medium / Plasma-Trapped Cache 1"
|
||||
mapPath: Maps/Salvage/medium-1.yml
|
||||
mapPath: /Maps/Salvage/medium-1.yml
|
||||
size: 7.5
|
||||
|
||||
- type: salvageMap
|
||||
id: mediumvault1
|
||||
name: "Medium / Vault 1"
|
||||
mapPath: Maps/Salvage/medium-vault-1.yml
|
||||
mapPath: /Maps/Salvage/medium-vault-1.yml
|
||||
size: 7.5
|
||||
|
||||
- type: salvageMap
|
||||
id: mediumOrchestra
|
||||
name: "Medium / Silent Orchestra"
|
||||
mapPath: Maps/Salvage/medium-silent-orchestra.yml
|
||||
mapPath: /Maps/Salvage/medium-silent-orchestra.yml
|
||||
size: 7.5
|
||||
|
||||
- type: salvageMap
|
||||
id: mediumShuttleWreck
|
||||
name: "Medium / Ruined Emergency Shuttle"
|
||||
mapPath: Maps/Salvage/medium-ruined-emergency-shuttle.yml
|
||||
mapPath: /Maps/Salvage/medium-ruined-emergency-shuttle.yml
|
||||
size: 8.5 # Over standard medium wreck size, may need future adjustment.
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
- type: gameMap
|
||||
id: empty
|
||||
mapName: Empty
|
||||
mapPath: Maps/Test/empty.yml
|
||||
mapPath: /Maps/Test/empty.yml
|
||||
minPlayers: 0
|
||||
votable: false
|
||||
overflowJobs:
|
||||
@@ -16,7 +16,7 @@
|
||||
nameGenerator:
|
||||
!type:NanotrasenNameGenerator
|
||||
prefixCreator: '14'
|
||||
mapPath: Maps/knightship.yml
|
||||
mapPath: /Maps/knightship.yml
|
||||
minPlayers: 0
|
||||
votable: false
|
||||
overflowJobs:
|
||||
|
||||
Reference in New Issue
Block a user