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))
|
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)
|
if (gameMapEnt is null)
|
||||||
{
|
{
|
||||||
shell.WriteError($"Failed to create the given game map, is the path {gameMap.MapPath} correct?");
|
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);
|
_pauseManager.AddUninitializedMap(toLoad);
|
||||||
}
|
}
|
||||||
|
|
||||||
_mapLoader.LoadMap(toLoad, map.MapPath);
|
_mapLoader.LoadMap(toLoad, map.MapPath.ToString());
|
||||||
|
|
||||||
var grids = _mapManager.GetAllMapGrids(toLoad).ToList();
|
var grids = _mapManager.GetAllMapGrids(toLoad).ToList();
|
||||||
var dict = new Dictionary<string, StationId>();
|
var dict = new Dictionary<string, StationId>();
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Robust.Shared.Prototypes;
|
|||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||||
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Server.Maps;
|
namespace Content.Server.Maps;
|
||||||
|
|
||||||
@@ -52,7 +53,7 @@ public class GameMapPrototype : IPrototype
|
|||||||
/// Relative directory path to the given map, i.e. `Maps/saltern.yml`
|
/// Relative directory path to the given map, i.e. `Maps/saltern.yml`
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("mapPath", required: true)]
|
[DataField("mapPath", required: true)]
|
||||||
public string MapPath { get; } = default!;
|
public ResourcePath MapPath { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controls if the map can be used as a fallback if no maps are eligible.
|
/// 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 Content.Server.Objectives.Interfaces;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
using Robust.Shared.Serialization.TypeSerializers.Implementations;
|
||||||
|
using Robust.Shared.Utility;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
namespace Content.Server.Salvage
|
namespace Content.Server.Salvage
|
||||||
@@ -19,7 +21,7 @@ namespace Content.Server.Salvage
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("mapPath", required: true)]
|
[DataField("mapPath", required: true)]
|
||||||
public string MapPath { get; } = default!;
|
public ResourcePath MapPath { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Size *from 0,0* in units of the map (used to determine if it fits)
|
/// 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");
|
Report("salvage-system-announcement-spawn-no-debris-available");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var bp = _mapLoader.LoadBlueprint(spl.MapId, map.MapPath);
|
var bp = _mapLoader.LoadBlueprint(spl.MapId, map.MapPath.ToString());
|
||||||
if (bp == null)
|
if (bp == null)
|
||||||
{
|
{
|
||||||
Report("salvage-system-announcement-spawn-debris-disintegrated");
|
Report("salvage-system-announcement-spawn-debris-disintegrated");
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace Content.Server.Weapon.Ranged.Ammunition.Components
|
|||||||
[DataField("ammoVelocity")]
|
[DataField("ammoVelocity")]
|
||||||
public float Velocity { get; } = 20f;
|
public float Velocity { get; } = 20f;
|
||||||
|
|
||||||
[DataField("muzzleFlash", customTypeSerializer:typeof(ResourcePathSerializer))]
|
[DataField("muzzleFlash")]
|
||||||
public ResourcePath? MuzzleFlashSprite = new("Objects/Weapons/Guns/Projectiles/bullet_muzzle.png");
|
public ResourcePath? MuzzleFlashSprite = new("Objects/Weapons/Guns/Projectiles/bullet_muzzle.png");
|
||||||
|
|
||||||
[DataField("soundCollectionEject")]
|
[DataField("soundCollectionEject")]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
nameGenerator:
|
nameGenerator:
|
||||||
!type:NanotrasenNameGenerator
|
!type:NanotrasenNameGenerator
|
||||||
prefixCreator: '14'
|
prefixCreator: '14'
|
||||||
mapPath: Maps/saltern.yml
|
mapPath: /Maps/saltern.yml
|
||||||
minPlayers: 0
|
minPlayers: 0
|
||||||
maxPlayers: 20
|
maxPlayers: 20
|
||||||
fallback: true
|
fallback: true
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
nameGenerator:
|
nameGenerator:
|
||||||
!type:NanotrasenNameGenerator
|
!type:NanotrasenNameGenerator
|
||||||
prefixCreator: 'VG'
|
prefixCreator: 'VG'
|
||||||
mapPath: Maps/packedstation.yml
|
mapPath: /Maps/packedstation.yml
|
||||||
minPlayers: 15
|
minPlayers: 15
|
||||||
conditions:
|
conditions:
|
||||||
- !type:HolidayMapCondition
|
- !type:HolidayMapCondition
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
nameGenerator:
|
nameGenerator:
|
||||||
!type:NanotrasenNameGenerator
|
!type:NanotrasenNameGenerator
|
||||||
prefixCreator: '14'
|
prefixCreator: '14'
|
||||||
mapPath: Maps/knightship.yml
|
mapPath: /Maps/knightship.yml
|
||||||
minPlayers: 0
|
minPlayers: 0
|
||||||
maxPlayers: 8
|
maxPlayers: 8
|
||||||
overflowJobs: []
|
overflowJobs: []
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
nameGenerator:
|
nameGenerator:
|
||||||
!type:NanotrasenNameGenerator
|
!type:NanotrasenNameGenerator
|
||||||
prefixCreator: '14'
|
prefixCreator: '14'
|
||||||
mapPath: Maps/ssreach.yml
|
mapPath: /Maps/ssreach.yml
|
||||||
minPlayers: 8
|
minPlayers: 8
|
||||||
maxPlayers: 25
|
maxPlayers: 25
|
||||||
overflowJobs:
|
overflowJobs:
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
nameGenerator:
|
nameGenerator:
|
||||||
!type:NanotrasenNameGenerator
|
!type:NanotrasenNameGenerator
|
||||||
prefixCreator: '14'
|
prefixCreator: '14'
|
||||||
mapPath: Maps/dart.yml
|
mapPath: /Maps/dart.yml
|
||||||
minPlayers: 0
|
minPlayers: 0
|
||||||
votable: false
|
votable: false
|
||||||
overflowJobs: []
|
overflowJobs: []
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
nameGenerator:
|
nameGenerator:
|
||||||
!type:NanotrasenNameGenerator
|
!type:NanotrasenNameGenerator
|
||||||
prefixCreator: 'VG'
|
prefixCreator: 'VG'
|
||||||
mapPath: Maps/moonrise.yml
|
mapPath: /Maps/moonrise.yml
|
||||||
minPlayers: 0
|
minPlayers: 0
|
||||||
votable: false
|
votable: false
|
||||||
overflowJobs: []
|
overflowJobs: []
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
nameGenerator:
|
nameGenerator:
|
||||||
!type:NanotrasenNameGenerator
|
!type:NanotrasenNameGenerator
|
||||||
prefixCreator: 'VG'
|
prefixCreator: 'VG'
|
||||||
mapPath: Maps/packedstationxmas.yml
|
mapPath: /Maps/packedstationxmas.yml
|
||||||
minPlayers: 15
|
minPlayers: 15
|
||||||
conditions:
|
conditions:
|
||||||
- !type:HolidayMapCondition
|
- !type:HolidayMapCondition
|
||||||
|
|||||||
@@ -6,37 +6,37 @@
|
|||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: small1
|
id: small1
|
||||||
name: "Small / Engineering Storage 1"
|
name: "Small / Engineering Storage 1"
|
||||||
mapPath: Maps/Salvage/small-1.yml
|
mapPath: /Maps/Salvage/small-1.yml
|
||||||
size: 3.5
|
size: 3.5
|
||||||
|
|
||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: small2
|
id: small2
|
||||||
name: "Small / Gaming Nook 1"
|
name: "Small / Gaming Nook 1"
|
||||||
mapPath: Maps/Salvage/small-2.yml
|
mapPath: /Maps/Salvage/small-2.yml
|
||||||
size: 3.5
|
size: 3.5
|
||||||
|
|
||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: small-ship-1
|
id: small-ship-1
|
||||||
name: "Small / Ship 1 (Pill)"
|
name: "Small / Ship 1 (Pill)"
|
||||||
mapPath: Maps/Salvage/small-ship-1.yml
|
mapPath: /Maps/Salvage/small-ship-1.yml
|
||||||
size: 3.5
|
size: 3.5
|
||||||
|
|
||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: small3
|
id: small3
|
||||||
name: "Small / Laundromat 1"
|
name: "Small / Laundromat 1"
|
||||||
mapPath: Maps/Salvage/small-3.yml
|
mapPath: /Maps/Salvage/small-3.yml
|
||||||
size: 3.5
|
size: 3.5
|
||||||
|
|
||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: smallAISurveyDrone
|
id: smallAISurveyDrone
|
||||||
name: "Small / AI Survey Drone"
|
name: "Small / AI Survey Drone"
|
||||||
mapPath: Maps/Salvage/small-ai-survey-drone.yml
|
mapPath: /Maps/Salvage/small-ai-survey-drone.yml
|
||||||
size: 3.5
|
size: 3.5
|
||||||
|
|
||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: small4
|
id: small4
|
||||||
name: "Small / Bar Salvage"
|
name: "Small / Bar Salvage"
|
||||||
mapPath: Maps/Salvage/small-4.yml
|
mapPath: /Maps/Salvage/small-4.yml
|
||||||
size: 3.5
|
size: 3.5
|
||||||
|
|
||||||
# Small - Asteroids
|
# Small - Asteroids
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: smallA1
|
id: smallA1
|
||||||
name: "Small / Asteroid 1 Plasmafire"
|
name: "Small / Asteroid 1 Plasmafire"
|
||||||
mapPath: Maps/Salvage/small-a-1.yml
|
mapPath: /Maps/Salvage/small-a-1.yml
|
||||||
size: 3.5
|
size: 3.5
|
||||||
|
|
||||||
# "Medium"-class maps - Max size square: 15x15, indicated size: 7.5
|
# "Medium"-class maps - Max size square: 15x15, indicated size: 7.5
|
||||||
@@ -52,25 +52,25 @@
|
|||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: medium1
|
id: medium1
|
||||||
name: "Medium / Plasma-Trapped Cache 1"
|
name: "Medium / Plasma-Trapped Cache 1"
|
||||||
mapPath: Maps/Salvage/medium-1.yml
|
mapPath: /Maps/Salvage/medium-1.yml
|
||||||
size: 7.5
|
size: 7.5
|
||||||
|
|
||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: mediumvault1
|
id: mediumvault1
|
||||||
name: "Medium / Vault 1"
|
name: "Medium / Vault 1"
|
||||||
mapPath: Maps/Salvage/medium-vault-1.yml
|
mapPath: /Maps/Salvage/medium-vault-1.yml
|
||||||
size: 7.5
|
size: 7.5
|
||||||
|
|
||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: mediumOrchestra
|
id: mediumOrchestra
|
||||||
name: "Medium / Silent Orchestra"
|
name: "Medium / Silent Orchestra"
|
||||||
mapPath: Maps/Salvage/medium-silent-orchestra.yml
|
mapPath: /Maps/Salvage/medium-silent-orchestra.yml
|
||||||
size: 7.5
|
size: 7.5
|
||||||
|
|
||||||
- type: salvageMap
|
- type: salvageMap
|
||||||
id: mediumShuttleWreck
|
id: mediumShuttleWreck
|
||||||
name: "Medium / Ruined Emergency Shuttle"
|
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.
|
size: 8.5 # Over standard medium wreck size, may need future adjustment.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
- type: gameMap
|
- type: gameMap
|
||||||
id: empty
|
id: empty
|
||||||
mapName: Empty
|
mapName: Empty
|
||||||
mapPath: Maps/Test/empty.yml
|
mapPath: /Maps/Test/empty.yml
|
||||||
minPlayers: 0
|
minPlayers: 0
|
||||||
votable: false
|
votable: false
|
||||||
overflowJobs:
|
overflowJobs:
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
nameGenerator:
|
nameGenerator:
|
||||||
!type:NanotrasenNameGenerator
|
!type:NanotrasenNameGenerator
|
||||||
prefixCreator: '14'
|
prefixCreator: '14'
|
||||||
mapPath: Maps/knightship.yml
|
mapPath: /Maps/knightship.yml
|
||||||
minPlayers: 0
|
minPlayers: 0
|
||||||
votable: false
|
votable: false
|
||||||
overflowJobs:
|
overflowJobs:
|
||||||
|
|||||||
Reference in New Issue
Block a user