Merge remote-tracking branch 'upstream/master' into ed-03-10-2024-upstream
# Conflicts: # Resources/Prototypes/Entities/Mobs/Customization/Markings/human_hair.yml
This commit is contained in:
@@ -11,6 +11,8 @@ namespace Content.Server.Power.EntitySystems;
|
||||
public sealed partial class CableSystem
|
||||
{
|
||||
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
|
||||
private void InitializeCablePlacer()
|
||||
{
|
||||
@@ -26,11 +28,12 @@ public sealed partial class CableSystem
|
||||
if (component.CablePrototypeId == null)
|
||||
return;
|
||||
|
||||
if(!TryComp<MapGridComponent>(args.ClickLocation.GetGridUid(EntityManager), out var grid))
|
||||
if(!TryComp<MapGridComponent>(_transform.GetGrid(args.ClickLocation), out var grid))
|
||||
return;
|
||||
|
||||
var gridUid = _transform.GetGrid(args.ClickLocation)!.Value;
|
||||
var snapPos = grid.TileIndicesFor(args.ClickLocation);
|
||||
var tileDef = (ContentTileDefinition) _tileManager[grid.GetTileRef(snapPos).Tile.TypeId];
|
||||
var tileDef = (ContentTileDefinition) _tileManager[_map.GetTileRef(gridUid, grid,snapPos).Tile.TypeId];
|
||||
|
||||
if ((!tileDef.IsSubFloor || !tileDef.Sturdy) && placer.Comp.CP14OnlySubfloor) //CP14 if only subfloor
|
||||
return;
|
||||
|
||||
@@ -17,7 +17,6 @@ public sealed partial class CableSystem : EntitySystem
|
||||
[Dependency] private readonly SharedToolSystem _toolSystem = default!;
|
||||
[Dependency] private readonly StackSystem _stack = default!;
|
||||
[Dependency] private readonly ElectrocutionSystem _electrocutionSystem = default!;
|
||||
[Dependency] private readonly IAdminLogManager _adminLogs = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -51,7 +50,7 @@ public sealed partial class CableSystem : EntitySystem
|
||||
if (_electrocutionSystem.TryDoElectrifiedAct(uid, args.User))
|
||||
return;
|
||||
|
||||
_adminLogs.Add(LogType.CableCut, LogImpact.Medium, $"The {ToPrettyString(uid)} at {xform.Coordinates} was cut by {ToPrettyString(args.User)}.");
|
||||
_adminLogger.Add(LogType.CableCut, LogImpact.Medium, $"The {ToPrettyString(uid)} at {xform.Coordinates} was cut by {ToPrettyString(args.User)}.");
|
||||
|
||||
Spawn(cable.CableDroppedOnCutPrototype, xform.Coordinates);
|
||||
QueueDel(uid);
|
||||
|
||||
Reference in New Issue
Block a user