]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
MapManager warnings cleanup Server Edition 2003 (#36781)
authorKyle Tyo <36606155+VerinSenpai@users.noreply.github.com>
Mon, 9 Jun 2025 00:09:42 +0000 (20:09 -0400)
committerGitHub <noreply@github.com>
Mon, 9 Jun 2025 00:09:42 +0000 (02:09 +0200)
* now you see me

* unused depen

* test fail fix attempt 1

* test fail fix attempt 2

* fix test fail attempt 3

* shot in the dark.

* Does this work?

* import cleanup

* taking a shot at this.

* Convert PersistenceSaveCommand to LocalizedEntityCommands.

* requested changes

* requested changes. also dealt with improperly named private const

* Update Content.Server/GameTicking/GameTicker.Spawning.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Update Content.Server/GameTicking/GameTicker.Spawning.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Convert PlanetCommand to LocalizedEntityCommand

* Update BiomeSystem.cs

* Update Content.Server/Salvage/SalvageSystem.Runner.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Update Content.Server/Procedural/DungeonSystem.Rooms.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Update Content.Server/Salvage/SpawnSalvageMissionJob.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Update Content.Server/Station/Systems/StationBiomeSystem.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* revert to latest master.

* slartis suggestion.

* Update SetMapAtmosCommand.cs

* cleanup

* Update PersistenceSaveCommand.cs

* finish localizing persistencesavecommand

* this is icky, I change.

* :sigh:

* revert whatever I did here?

* oh I see, some inconsistencies.

* revert this

* Update PlanetCommand.cs

* move this ftl to the commands folder

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Content.Server/Administration/Commands/PersistenceSaveCommand.cs
Content.Server/Polymorph/Systems/PolymorphSystem.cs
Content.Shared/Weather/SharedWeatherSystem.cs
Resources/Locale/en-US/commands/persistence-save-command.ftl [new file with mode: 0644]
Resources/Locale/en-US/persistence/command.ftl [deleted file]

index 56ad2be2609d62c5c795c34a354fc530cfd33733..269e651e81e941aa79b834cab293809546a0f475 100644 (file)
@@ -12,12 +12,10 @@ namespace Content.Server.Administration.Commands;
 public sealed class PersistenceSave : LocalizedEntityCommands
 {
     [Dependency] private readonly IConfigurationManager _config = default!;
-    [Dependency] private readonly IEntitySystemManager _system = default!;
     [Dependency] private readonly SharedMapSystem _map = default!;
+    [Dependency] private readonly MapLoaderSystem _mapLoader = default!;
 
     public override string Command => "persistencesave";
-    public override string Description => "Saves server data to a persistence file to be loaded later.";
-    public override string Help => "persistencesave [mapId] [filePath - default: game.map (CCVar) ]";
 
     public override void Execute(IConsoleShell shell, string argStr, string[] args)
     {
@@ -47,8 +45,7 @@ public sealed class PersistenceSave : LocalizedEntityCommands
             return;
         }
 
-        var mapLoader = _system.GetEntitySystem<MapLoaderSystem>();
-        mapLoader.TrySaveMap(mapId, new ResPath(saveFilePath));
+        _mapLoader.TrySaveMap(mapId, new ResPath(saveFilePath));
         shell.WriteLine(Loc.GetString("cmd-savemap-success"));
     }
 }
index 5976594a577d5b429a6e98afa6857a89aefdf880..c134eca114be3675f3b67b3815ddc24d121a3c4f 100644 (file)
@@ -20,7 +20,6 @@ using Content.Shared.Popups;
 using Robust.Server.Audio;
 using Robust.Server.Containers;
 using Robust.Server.GameObjects;
-using Robust.Shared.Map;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
index 382af645655e2fa156e1e5ad5d2f1ef86525b4c6..b5378849504d05f7b681c041d23d36e3d21cc467 100644 (file)
@@ -13,7 +13,6 @@ namespace Content.Shared.Weather;
 public abstract class SharedWeatherSystem : EntitySystem
 {
     [Dependency] protected readonly IGameTiming Timing = default!;
-    [Dependency] protected readonly IMapManager MapManager = default!;
     [Dependency] protected readonly IPrototypeManager ProtoMan = default!;
     [Dependency] private readonly ITileDefinitionManager _tileDefManager = default!;
     [Dependency] private readonly MetaDataSystem _metadata = default!;
diff --git a/Resources/Locale/en-US/commands/persistence-save-command.ftl b/Resources/Locale/en-US/commands/persistence-save-command.ftl
new file mode 100644 (file)
index 0000000..d12ff8c
--- /dev/null
@@ -0,0 +1,3 @@
+cmd-persistencesave-desc = Saves server data to a persistence file to be loaded later.
+cmd-persistencesave-usage = persistencesave [mapId] [filePath - default: game.map (CCVar) ]
+cmd-persistencesave-no-path = filePath was not specified and CCVar {$cvar} is not set. Manually set the filePath param in order to save the map.
diff --git a/Resources/Locale/en-US/persistence/command.ftl b/Resources/Locale/en-US/persistence/command.ftl
deleted file mode 100644 (file)
index b070aee..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cmd-persistencesave-no-path = filePath was not specified and CCVar {$cvar} is not set. Manually set the filePath param in order to save the map.