Fix mime wall & turf/tile helper issues. (#17844)
This commit is contained in:
@@ -1,17 +1,10 @@
|
||||
using System.Threading;
|
||||
using Content.Server.Fluids.Components;
|
||||
using Content.Server.Tools.Components;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Fluids.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Maps;
|
||||
using Content.Shared.Tools.Components;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.Tools;
|
||||
|
||||
@@ -41,20 +34,21 @@ public sealed partial class ToolSystem
|
||||
var gridUid = args.Coordinates.GetGridUid(EntityManager);
|
||||
if (!_mapManager.TryGetGrid(gridUid, out var grid))
|
||||
{
|
||||
Logger.Error("Attempted to pry from a non-existent grid?");
|
||||
Log.Error("Attempted to pry from a non-existent grid?");
|
||||
return;
|
||||
}
|
||||
|
||||
var tile = grid.GetTileRef(args.Coordinates);
|
||||
var center = _turf.GetTileCenter(tile);
|
||||
if (args.Used != null)
|
||||
{
|
||||
_adminLogger.Add(LogType.Action, LogImpact.Low,
|
||||
$"{ToPrettyString(args.User):actor} used {ToPrettyString(args.Used.Value):tool} to pry {_tileDefinitionManager[tile.Tile.TypeId].Name} at {ToPrettyString(tile.GridUid):grid} {tile.GridPosition()}");
|
||||
$"{ToPrettyString(args.User):actor} used {ToPrettyString(args.Used.Value):tool} to pry {_tileDefinitionManager[tile.Tile.TypeId].Name} at {center}");
|
||||
}
|
||||
else
|
||||
{
|
||||
_adminLogger.Add(LogType.Action, LogImpact.Low,
|
||||
$"{ToPrettyString(args.User):actor} pried {_tileDefinitionManager[tile.Tile.TypeId].Name} at {ToPrettyString(tile.GridUid):grid} {tile.GridPosition()}");
|
||||
$"{ToPrettyString(args.User):actor} pried {_tileDefinitionManager[tile.Tile.TypeId].Name} at {center}");
|
||||
}
|
||||
|
||||
_tile.PryTile(tile);
|
||||
|
||||
@@ -2,6 +2,7 @@ using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Tools.Components;
|
||||
using Content.Shared.Maps;
|
||||
using Content.Shared.Tools;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
@@ -17,6 +18,7 @@ namespace Content.Server.Tools
|
||||
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly TransformSystem _transformSystem = default!;
|
||||
[Dependency] private readonly TurfSystem _turf = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user