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;
|
||||
|
||||
Reference in New Issue
Block a user