Cleanup remaining IMapManager.MapExists uses (#37851)
Cleanup remaining IMapManager.MapExists uses
This commit is contained in:
@@ -9,17 +9,17 @@ using Robust.Shared.Utility;
|
||||
namespace Content.Server.Administration.Commands;
|
||||
|
||||
[AdminCommand(AdminFlags.Server)]
|
||||
public sealed class PersistenceSave : IConsoleCommand
|
||||
public sealed class PersistenceSave : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly IConfigurationManager _config = default!;
|
||||
[Dependency] private readonly IEntitySystemManager _system = default!;
|
||||
[Dependency] private readonly IMapManager _map = default!;
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
|
||||
public string Command => "persistencesave";
|
||||
public string Description => "Saves server data to a persistence file to be loaded later.";
|
||||
public string Help => "persistencesave [mapId] [filePath - default: game.map (CCVar) ]";
|
||||
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 void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 1 || args.Length > 2)
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Content.Server.GameTicking
|
||||
/// </remarks>
|
||||
private void LoadMaps()
|
||||
{
|
||||
if (_mapManager.MapExists(DefaultMap))
|
||||
if (_map.MapExists(DefaultMap))
|
||||
return;
|
||||
|
||||
AddGamePresetRules();
|
||||
@@ -208,7 +208,7 @@ namespace Content.Server.GameTicking
|
||||
}
|
||||
|
||||
_metaData.SetEntityName(mapUid, proto.MapName);
|
||||
var g = new List<EntityUid> {grid.Value.Owner};
|
||||
var g = new List<EntityUid> { grid.Value.Owner };
|
||||
RaiseLocalEvent(new PostGameMapLoad(proto, mapId, g, stationName));
|
||||
return g;
|
||||
}
|
||||
@@ -258,7 +258,7 @@ namespace Content.Server.GameTicking
|
||||
}
|
||||
|
||||
_metaData.SetEntityName(mapUid, proto.MapName);
|
||||
var g = new List<EntityUid> {grid.Value.Owner};
|
||||
var g = new List<EntityUid> { grid.Value.Owner };
|
||||
RaiseLocalEvent(new PostGameMapLoad(proto, mapId, g, stationName));
|
||||
return g;
|
||||
}
|
||||
@@ -308,7 +308,7 @@ namespace Content.Server.GameTicking
|
||||
throw new Exception($"Failed to load game-map grid {ev.GameMap.ID}");
|
||||
}
|
||||
|
||||
var g = new List<EntityUid> {grid.Value.Owner};
|
||||
var g = new List<EntityUid> { grid.Value.Owner };
|
||||
// TODO MAP LOADING use a new event?
|
||||
RaiseLocalEvent(new PostGameMapLoad(proto, targetMap, g, stationName));
|
||||
return g;
|
||||
@@ -390,7 +390,7 @@ namespace Content.Server.GameTicking
|
||||
HumanoidCharacterProfile profile;
|
||||
if (_prefsManager.TryGetCachedPreferences(userId, out var preferences))
|
||||
{
|
||||
profile = (HumanoidCharacterProfile) preferences.SelectedCharacter;
|
||||
profile = (HumanoidCharacterProfile)preferences.SelectedCharacter;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ public sealed class WeatherSystem : SharedWeatherSystem
|
||||
|
||||
var mapId = new MapId(mapInt);
|
||||
|
||||
if (!MapManager.MapExists(mapId))
|
||||
if (!_mapSystem.MapExists(mapId))
|
||||
return;
|
||||
|
||||
if (!_mapSystem.TryGetMap(mapId, out var mapUid))
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Shared.Explosion.Components;
|
||||
/// <summary>
|
||||
/// Component for tracking active trigger timers. A timers can activated by some other component, e.g. <see cref="OnUseTimerTriggerComponent"/>.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[RegisterComponent]
|
||||
public sealed partial class ActiveTimerTriggerComponent : Component
|
||||
{
|
||||
[DataField] public float TimeRemaining;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Shared.StoreDiscount.Components;
|
||||
/// <summary>
|
||||
/// Partner-component for adding discounts functionality to StoreSystem using StoreDiscountSystem.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[RegisterComponent]
|
||||
public sealed partial class StoreDiscountComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user