Cleanup all instances of IMapManager.GetMapEntityId (#37814)

* Cleanup all instances of IMapManager.GetMapEntityId

* Dependencies

* LocalizedEntityCommands
This commit is contained in:
Tayrtahn
2025-05-25 13:09:47 -04:00
committed by GitHub
parent e08a7f3c84
commit 50fb48de2e
8 changed files with 39 additions and 41 deletions

View File

@@ -1,17 +1,16 @@
using Content.Server.Parallax;
using Content.Server.Station.Components;
using Content.Server.Station.Events;
using Content.Server.Station.Systems;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
namespace Content.Server.Station.Systems;
public sealed partial class StationBiomeSystem : EntitySystem
{
[Dependency] private readonly BiomeSystem _biome = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly StationSystem _station = default!;
[Dependency] private readonly SharedMapSystem _map = default!;
public override void Initialize()
{
@@ -28,7 +27,7 @@ public sealed partial class StationBiomeSystem : EntitySystem
if (station == null) return;
var mapId = Transform(station.Value).MapID;
var mapUid = _mapManager.GetMapEntityId(mapId);
var mapUid = _map.GetMapOrInvalid(mapId);
_biome.EnsurePlanet(mapUid, _proto.Index(map.Comp.Biome), map.Comp.Seed, mapLight: map.Comp.MapLightColor);
}