Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Content.Client/Atmos/AlignAtmosPipeLayers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public sealed partial class AlignAtmosPipeLayers : SnapgridCenter
{
[Dependency] private IEntityManager _entityManager = default!;
[Dependency] private IPrototypeManager _protoManager = default!;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] private IEyeManager _eyeManager = default!;

private readonly SharedMapSystem _mapSystem;
Expand Down Expand Up @@ -99,7 +98,7 @@ public override void AlignPlacementMode(ScreenCoordinates mouseScreen)
if (pManager.PlacementType != PlacementTypes.None)
return;

MouseCoords = _unalignedMouseCoords.AlignWithClosestGridTile(SearchBoxSize, _entityManager, _mapManager);
MouseCoords = _unalignedMouseCoords.AlignWithClosestGridTile(SearchBoxSize, _entityManager);

var gridId = _transformSystem.GetGrid(MouseCoords);

Expand Down
3 changes: 1 addition & 2 deletions Content.Client/Atmos/Overlays/AtmosDebugOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace Content.Client.Atmos.Overlays;
public sealed partial class AtmosDebugOverlay : Overlay
{
[Dependency] private IEntityManager _entManager = default!;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] private IInputManager _input = default!;
[Dependency] private IUserInterfaceManager _ui = default!;
[Dependency] private IResourceCache _cache = default!;
Expand Down Expand Up @@ -262,7 +261,7 @@ private void DrawTooltip(DrawingHandleScreen handle, Vector2 pos, AtmosDebugOver
private void GetGrids(MapId mapId, Box2Rotated box)
{
_grids.Clear();
_mapManager.FindGridsIntersecting(
_map.FindGridsIntersecting(
mapId,
box,
ref _grids,
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Atmos/Overlays/GasTileOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public sealed class GasTileOverlay : Overlay
private static readonly ProtoId<ShaderPrototype> UnshadedShader = "unshaded";

private readonly IEntityManager _entManager;
private readonly IMapManager _mapManager;
private readonly SharedMapSystem _mapManager;
private readonly SharedAtmosphereSystem _atmosphereSystem;
private readonly SharedMapSystem _mapSystem;
private readonly SharedTransformSystem _xformSys;
Expand Down Expand Up @@ -55,7 +55,7 @@ public sealed class GasTileOverlay : Overlay
public GasTileOverlay(GasTileOverlaySystem system, IEntityManager entManager, IResourceCache resourceCache, IPrototypeManager protoMan, SpriteSystem spriteSys, SharedTransformSystem xformSys)
{
_entManager = entManager;
_mapManager = IoCManager.Resolve<IMapManager>();
_mapManager = entManager.System<SharedMapSystem>();
_atmosphereSystem = entManager.System<SharedAtmosphereSystem>();
_mapSystem = entManager.System<SharedMapSystem>();
_xformSys = xformSys;
Expand Down
6 changes: 4 additions & 2 deletions Content.Client/Decals/Overlays/DecalPlacementOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ namespace Content.Client.Decals.Overlays;
[Virtual]
public partial class DecalPlacementOverlay : Overlay
{
[Dependency] private IEntityManager _entity = default!;
[Dependency] private IEyeManager _eyeManager = default!;
[Dependency] private IInputManager _inputManager = default!;
[Dependency] private IMapManager _mapManager = default!;
private readonly MapSystem _map;
private readonly DecalPlacementSystem _placement;
private readonly SharedTransformSystem _transform;
private readonly SpriteSystem _sprite;
Expand All @@ -28,6 +29,7 @@ public partial class DecalPlacementOverlay : Overlay
public DecalPlacementOverlay(DecalPlacementSystem placement, SharedTransformSystem transform, SpriteSystem sprite)
{
IoCManager.InjectDependencies(this);
_map = _entity.System<MapSystem>();
_placement = placement;
_transform = transform;
_sprite = sprite;
Expand All @@ -53,7 +55,7 @@ protected override void Draw(in OverlayDrawArgs args)
return;

// No map support for decals
if (!_mapManager.TryFindGridAt(mousePos, out var gridUid, out var grid))
if (!_map.TryFindGridAt(mousePos, out var gridUid, out var grid))
{
return;
}
Expand Down
6 changes: 3 additions & 3 deletions Content.Client/Gameplay/GameplayStateBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public partial class GameplayStateBase : State, IEntityEventSubscriber
[Dependency] private IPlayerManager _playerManager = default!;
[Dependency] private IEntitySystemManager _entitySystemManager = default!;
[Dependency] private IGameTiming _timing = default!;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] protected IUserInterfaceManager UserInterfaceManager = default!;
[Dependency] private IEntityManager _entityManager = default!;
[Dependency] private IViewVariablesManager _vvm = default!;
Expand Down Expand Up @@ -231,7 +230,8 @@ protected virtual void OnKeyBindStateChanged(ViewportBoundKeyEventArgs args)
{
var mousePosWorld = vp.PixelToMap(kArgs.PointerLocation.Position);

if (_mapManager.MapExists(mousePosWorld.MapId))
var map = _entitySystemManager.GetEntitySystem<SharedMapSystem>();
if (map.MapExists(mousePosWorld.MapId))
{
if (vp is ScalingViewport svp)
{
Expand All @@ -245,7 +245,7 @@ protected virtual void OnKeyBindStateChanged(ViewportBoundKeyEventArgs args)
var transformSystem = _entitySystemManager.GetEntitySystem<SharedTransformSystem>();
var mapSystem = _entitySystemManager.GetEntitySystem<MapSystem>();

coordinates = _mapManager.TryFindGridAt(mousePosWorld, out var uid, out _)
coordinates = map.TryFindGridAt(mousePosWorld, out var uid, out _)
? mapSystem.MapToGrid(uid, mousePosWorld)
: transformSystem.ToCoordinates(mousePosWorld);
}
Expand Down
9 changes: 6 additions & 3 deletions Content.Client/Light/AmbientOcclusionOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Robust.Shared.Configuration;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;

Expand All @@ -23,12 +24,12 @@ public sealed partial class AmbientOcclusionOverlay : Overlay
[Dependency] private IClyde _clyde = default!;
[Dependency] private IConfigurationManager _cfgManager = default!;
[Dependency] private IEntityManager _entManager = default!;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] private IPrototypeManager _proto = default!;

public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowEntities;

private readonly OverlayResourceCache<CachedResources> _resources = new ();
private List<Entity<MapGridComponent>> _grids = new();

public AmbientOcclusionOverlay()
{
Expand Down Expand Up @@ -115,7 +116,9 @@ protected override void Draw(in OverlayDrawArgs args)
// Don't want lighting affecting it.
worldHandle.UseShader(_proto.Index(UnshadedShader).Instance());

foreach (var grid in _mapManager.FindGridsIntersecting(mapId, worldBounds))
_grids.Clear();
maps.FindGridsIntersecting(mapId, worldBounds, ref _grids);
foreach (var grid in _grids)
{
var transform = xformSystem.GetWorldMatrix(grid.Owner);
var worldToTextureMatrix = Matrix3x2.Multiply(transform, invMatrix);
Expand All @@ -126,7 +129,7 @@ protected override void Draw(in OverlayDrawArgs args)
if (turfSystem.IsSpace(tileRef))
continue;

var bounds = lookups.GetLocalBounds(tileRef, grid.TileSize);
var bounds = lookups.GetLocalBounds(tileRef, grid.Comp.TileSize);
worldHandle.DrawRect(bounds, Color.White);
}
}
Expand Down
3 changes: 1 addition & 2 deletions Content.Client/Light/RoofOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace Content.Client.Light;
public sealed partial class RoofOverlay : Overlay
{
private readonly IEntityManager _entManager;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] private IOverlayManager _overlay = default!;

private readonly EntityLookupSystem _lookup;
Expand Down Expand Up @@ -56,7 +55,7 @@ protected override void Draw(in OverlayDrawArgs args)
var target = lightRes.EnlargedLightTarget;

_grids.Clear();
_mapManager.FindGridsIntersecting(args.MapId, bounds, ref _grids, approx: true, includeMap: true);
_mapSystem.FindGridsIntersecting(args.MapId, bounds, ref _grids, approx: true, includeMap: true);
var lightScale = viewport.LightRenderTarget.Size / (Vector2) viewport.Size;
var scale = viewport.RenderScale / (Vector2.One / lightScale);

Expand Down
5 changes: 3 additions & 2 deletions Content.Client/Light/SunShadowOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public sealed partial class SunShadowOverlay : Overlay

[Dependency] private IClyde _clyde = default!;
[Dependency] private IEntityManager _entManager = default!;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] private IPrototypeManager _protoManager = default!;
private readonly EntityLookupSystem _lookup;
private readonly SharedMapSystem _map;
private readonly SharedTransformSystem _xformSys;

private readonly HashSet<Entity<SunShadowCastComponent>> _shadows = new();
Expand All @@ -31,6 +31,7 @@ public SunShadowOverlay()
{
IoCManager.InjectDependencies(this);
_xformSys = _entManager.System<SharedTransformSystem>();
_map = _entManager.System<SharedMapSystem>();
_lookup = _entManager.System<EntityLookupSystem>();
ZIndex = AfterLightTargetOverlay.ContentZIndex + 1;
}
Expand All @@ -46,7 +47,7 @@ protected override void Draw(in OverlayDrawArgs args)
return;

_grids.Clear();
_mapManager.FindGridsIntersecting(args.MapId,
_map.FindGridsIntersecting(args.MapId,
args.WorldBounds.Enlarged(SunShadowComponent.MaxLength),
ref _grids);

Expand Down
3 changes: 1 addition & 2 deletions Content.Client/Light/TileEmissionOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public sealed partial class TileEmissionOverlay : Overlay
{
public override OverlaySpace Space => OverlaySpace.BeforeLighting;

[Dependency] private IMapManager _mapManager = default!;
[Dependency] private IOverlayManager _overlay = default!;

private SharedMapSystem _mapSystem;
Expand Down Expand Up @@ -50,7 +49,7 @@ protected override void Draw(in OverlayDrawArgs args)
var target = lightoverlay.GetCachedForViewport(args.Viewport).EnlargedLightTarget;
var viewport = args.Viewport;
_grids.Clear();
_mapManager.FindGridsIntersecting(mapId, bounds, ref _grids, approx: true);
_mapSystem.FindGridsIntersecting(mapId, bounds, ref _grids, approx: true);

if (_grids.Count == 0)
return;
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Mapping/MappingState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public sealed partial class MappingState : GameplayStateBase
[Dependency] private IEntityNetworkManager _entityNetwork = default!;
[Dependency] private IInputManager _input = default!;
[Dependency] private ILogManager _log = default!;
[Dependency] private IMapManager _mapMan = default!;
[Dependency] private MappingManager _mapping = default!;
[Dependency] private IOverlayManager _overlays = default!;
[Dependency] private IPlacementManager _placement = default!;
Expand All @@ -53,6 +52,7 @@ public sealed partial class MappingState : GameplayStateBase
private EntityMenuUIController _entityMenuController = default!;

private DecalPlacementSystem _decal = default!;
private MapSystem _map = default!;
private SpriteSystem _sprite = default!;
private TransformSystem _transform = default!;
private VerbSystem _verbs = default!;
Expand Down Expand Up @@ -791,7 +791,7 @@ private bool HandlePick(ICommonSession? session, EntityCoordinates coords, Entit
{
var mapPos = _transform.ToMapCoordinates(coords);

if (_mapMan.TryFindGridAt(mapPos, out var gridUid, out var grid) &&
if (_map.TryFindGridAt(mapPos, out var gridUid, out var grid) &&
_entityManager.System<SharedMapSystem>().TryGetTileRef(gridUid, grid, coords, out var tileRef) &&
_allPrototypesDict.TryGetValue(_entityManager.System<TurfSystem>().GetContentTileDefinition(tileRef), out button))
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Maps/GridDraggingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed partial class GridDraggingSystem : SharedGridDraggingSystem
[Dependency] private IEyeManager _eyeManager = default!;
[Dependency] private IGameTiming _gameTiming = default!;
[Dependency] private IInputManager _inputManager = default!;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] private SharedMapSystem _mapManager = default!;
[Dependency] private InputSystem _inputSystem = default!;
[Dependency] private SharedTransformSystem _transformSystem = default!;

Expand Down
6 changes: 3 additions & 3 deletions Content.Client/NPC/PathfindingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public sealed partial class PathfindingSystem : SharedPathfindingSystem
[Dependency] private IEyeManager _eyeManager = default!;
[Dependency] private IGameTiming _timing = default!;
[Dependency] private IInputManager _inputManager = default!;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] private SharedMapSystem _mapManager = default!;
[Dependency] private IOverlayManager _overlayManager = default!;
[Dependency] private IResourceCache _cache = default!;
[Dependency] private NPCSteeringSystem _steering = default!;
Expand Down Expand Up @@ -137,7 +137,7 @@ public sealed class PathfindingOverlay : Overlay
private readonly IEntityManager _entManager;
private readonly IEyeManager _eyeManager;
private readonly IInputManager _inputManager;
private readonly IMapManager _mapManager;
private readonly SharedMapSystem _mapManager;
private readonly PathfindingSystem _system;
private readonly MapSystem _mapSystem;
private readonly SharedTransformSystem _transformSystem;
Expand All @@ -151,7 +151,7 @@ public PathfindingOverlay(
IEntityManager entManager,
IEyeManager eyeManager,
IInputManager inputManager,
IMapManager mapManager,
SharedMapSystem mapManager,
IResourceCache cache,
PathfindingSystem system,
MapSystem mapSystem,
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/NodeContainer/NodeGroupSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed partial class NodeGroupSystem : EntitySystem
{
[Dependency] private IOverlayManager _overlayManager = default!;
[Dependency] private EntityLookupSystem _entityLookup = default!;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] private SharedMapSystem _mapManager = default!;
[Dependency] private IInputManager _inputManager = default!;
[Dependency] private IResourceCache _resourceCache = default!;

Expand Down
4 changes: 2 additions & 2 deletions Content.Client/NodeContainer/NodeVisualizationOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed class NodeVisualizationOverlay : Overlay
{
private readonly NodeGroupSystem _system;
private readonly EntityLookupSystem _lookup;
private readonly IMapManager _mapManager;
private readonly SharedMapSystem _mapManager;
private readonly IInputManager _inputManager;
private readonly IEntityManager _entityManager;
private readonly SharedTransformSystem _transformSystem;
Expand All @@ -38,7 +38,7 @@ public sealed class NodeVisualizationOverlay : Overlay
public NodeVisualizationOverlay(
NodeGroupSystem system,
EntityLookupSystem lookup,
IMapManager mapManager,
SharedMapSystem mapManager,
IInputManager inputManager,
IResourceCache cache,
IEntityManager entityManager)
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Overlays/StencilOverlay.Weather.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private void DrawWeather(
_grids.Clear();

// idk if this is safe to cache in a field and clear sloth help
_mapManager.FindGridsIntersecting(mapId, worldAABB, ref _grids);
_map.FindGridsIntersecting(mapId, worldAABB, ref _grids);

foreach (var grid in _grids)
{
Expand Down
2 changes: 0 additions & 2 deletions Content.Client/Overlays/StencilOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;

Expand All @@ -27,7 +26,6 @@ public sealed partial class StencilOverlay : Overlay
[Dependency] private IClyde _clyde = default!;
[Dependency] private IEntityManager _entManager = default!;
[Dependency] private IGameTiming _timing = default!;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] private IPrototypeManager _protoManager = default!;
private readonly ParallaxSystem _parallax;
private readonly SharedTransformSystem _transform;
Expand Down
3 changes: 1 addition & 2 deletions Content.Client/RCD/AlignRCDConstruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ namespace Content.Client.RCD;
public sealed partial class AlignRCDConstruction : PlacementMode
{
[Dependency] private IEntityManager _entityManager = default!;
[Dependency] private IMapManager _mapManager = default!;
private readonly SharedMapSystem _mapSystem;
private readonly HandsSystem _handsSystem;
private readonly RCDSystem _rcdSystem;
Expand Down Expand Up @@ -46,7 +45,7 @@ public AlignRCDConstruction(PlacementManager pMan) : base(pMan)
public override void AlignPlacementMode(ScreenCoordinates mouseScreen)
{
_unalignedMouseCoords = ScreenToCursorGrid(mouseScreen);
MouseCoords = _unalignedMouseCoords.AlignWithClosestGridTile(SearchBoxSize, _entityManager, _mapManager);
MouseCoords = _unalignedMouseCoords.AlignWithClosestGridTile(SearchBoxSize, _entityManager);

var gridId = _transformSystem.GetGrid(MouseCoords);

Expand Down
3 changes: 1 addition & 2 deletions Content.Client/Sandbox/SandboxSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public sealed partial class SandboxSystem : SharedSandboxSystem
{
[Dependency] private IClientAdminManager _adminManager = default!;
[Dependency] private IClientConsoleHost _consoleHost = default!;
[Dependency] private IMapManager _map = default!;
[Dependency] private IPlacementManager _placement = default!;
[Dependency] private ContentEyeSystem _contentEye = default!;
[Dependency] private SharedTransformSystem _transform = default!;
Expand Down Expand Up @@ -111,7 +110,7 @@ public bool Copy(ICommonSession? session, EntityCoordinates coords, EntityUid ui

// Try copy tile.

if (!_map.TryFindGridAt(_transform.ToMapCoordinates(coords), out var gridUid, out var grid) || !_mapSystem.TryGetTileRef(gridUid, grid, coords, out var tileRef))
if (!_mapSystem.TryFindGridAt(_transform.ToMapCoordinates(coords), out var gridUid, out var grid) || !_mapSystem.TryGetTileRef(gridUid, grid, coords, out var tileRef))
return false;

if (_placement.Eraser)
Expand Down
3 changes: 1 addition & 2 deletions Content.Client/Shuttles/UI/MapScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public sealed partial class MapScreen : BoxContainer
{
[Dependency] private IEntityManager _entManager = default!;
[Dependency] private IGameTiming _timing = default!;
[Dependency] private IMapManager _mapManager = default!;
[Dependency] private IRobustRandom _random = default!;
private readonly SharedAudioSystem _audio;
private readonly SharedMapSystem _maps;
Expand Down Expand Up @@ -311,7 +310,7 @@ private void RebuildMapObjects()
};

_mapHeadings.Add(mapComp.MapId, gridContents);
foreach (var grid in _mapManager.GetAllGrids(mapComp.MapId))
foreach (var grid in _maps.GetAllGrids(mapComp.MapId))
{
_entManager.TryGetComponent(grid.Owner, out IFFComponent? iffComp);

Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ namespace Content.Client.Shuttles.UI;
public sealed partial class ShuttleDockControl : BaseShuttleControl
{
[Dependency] private IGameTiming _timing = default!;
[Dependency] private IMapManager _mapManager = default!;
private readonly DockingSystem _dockSystem;
private readonly SharedMapSystem _mapManager;
private readonly SharedShuttleSystem _shuttles;
private readonly SharedTransformSystem _xformSystem;

Expand Down Expand Up @@ -62,6 +62,7 @@ public ShuttleDockControl() : base(2f, 32f, 8f)
{
RobustXamlLoader.Load(this);
_dockSystem = EntManager.System<DockingSystem>();
_mapManager = EntManager.System<SharedMapSystem>();
_shuttles = EntManager.System<SharedShuttleSystem>();
_xformSystem = EntManager.System<SharedTransformSystem>();
MinSize = new Vector2(SizeFull, SizeFull);
Expand Down
Loading
Loading