From: J Date: Sun, 30 Mar 2025 01:05:22 +0000 (+0000) Subject: Mapping warnings cleanup (#36168) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=99e675c5062201ecb7f85bb75fd0878268373b56;p=space-station-14.git Mapping warnings cleanup (#36168) * Mapping warnings cleanup * Redo --- diff --git a/Content.Client/Mapping/MappingState.cs b/Content.Client/Mapping/MappingState.cs index bcc739fe4f..57b45036e3 100644 --- a/Content.Client/Mapping/MappingState.cs +++ b/Content.Client/Mapping/MappingState.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using System.Numerics; using Content.Client.Administration.Managers; using Content.Client.ContextMenu.UI; @@ -149,7 +149,7 @@ public sealed class MappingState : GameplayStateBase { Deselect(); - var coords = args.Coordinates.ToMap(_entityManager, _transform); + var coords = _transform.ToMapCoordinates(args.Coordinates); if (_verbs.TryGetEntityMenuEntities(coords, out var entities)) _entityMenuController.OpenRootMenu(entities); diff --git a/Content.Server/Mapping/MappingCommand.cs b/Content.Server/Mapping/MappingCommand.cs index 12a7af4484..b44a09869e 100644 --- a/Content.Server/Mapping/MappingCommand.cs +++ b/Content.Server/Mapping/MappingCommand.cs @@ -2,8 +2,6 @@ using System.Linq; using Content.Server.Administration; using Content.Server.GameTicking; using Content.Shared.Administration; -using Content.Shared.CCVar; -using Robust.Shared.Configuration; using Robust.Shared.Console; using Robust.Shared.ContentPack; using Robust.Shared.EntitySerialization; @@ -19,7 +17,6 @@ namespace Content.Server.Mapping { [Dependency] private readonly IEntityManager _entities = default!; [Dependency] private readonly IMapManager _map = default!; - [Dependency] private readonly IConfigurationManager _cfg = default!; public string Command => "mapping"; public string Description => Loc.GetString("cmd-mapping-desc"); diff --git a/Content.Server/Mapping/MappingManager.cs b/Content.Server/Mapping/MappingManager.cs index 0097df2e55..3a46b301e8 100644 --- a/Content.Server/Mapping/MappingManager.cs +++ b/Content.Server/Mapping/MappingManager.cs @@ -1,12 +1,9 @@ -using System.IO; +using System.IO; using Content.Server.Administration.Managers; using Content.Shared.Administration; using Content.Shared.Mapping; -using Robust.Server.GameObjects; using Robust.Server.Player; -using Robust.Shared.EntitySerialization; using Robust.Shared.EntitySerialization.Systems; -using Robust.Shared.Map; using Robust.Shared.Network; using Robust.Shared.Serialization; using Robust.Shared.Utility; @@ -19,7 +16,6 @@ public sealed class MappingManager : IPostInjectInit { [Dependency] private readonly IAdminManager _admin = default!; [Dependency] private readonly ILogManager _log = default!; - [Dependency] private readonly IMapManager _map = default!; [Dependency] private readonly IServerNetManager _net = default!; [Dependency] private readonly IPlayerManager _players = default!; [Dependency] private readonly IEntitySystemManager _systems = default!; diff --git a/Content.Shared/Maps/TurfHelpers.cs b/Content.Shared/Maps/TurfHelpers.cs index 71bbb35db7..dfa12f3d8f 100644 --- a/Content.Shared/Maps/TurfHelpers.cs +++ b/Content.Shared/Maps/TurfHelpers.cs @@ -23,7 +23,7 @@ namespace Content.Shared.Maps return null; mapManager ??= IoCManager.Resolve(); - var pos = coordinates.ToMap(entityManager, entityManager.System()); + var pos = entityManager.System().ToMapCoordinates(coordinates); if (!mapManager.TryFindGridAt(pos, out _, out var grid)) return null;