Fix misc bugs (#15314)
This commit is contained in:
@@ -54,7 +54,7 @@ public sealed partial class ToolSystem
|
||||
|
||||
private bool TryCut(EntityUid toolEntity, EntityUid user, LatticeCuttingComponent component, EntityCoordinates clickLocation)
|
||||
{
|
||||
if (!_mapManager.TryGetGrid(clickLocation.GetGridUid(EntityManager), out var mapGrid))
|
||||
if (!_mapManager.TryFindGridAt(clickLocation.ToMap(EntityManager, _transformSystem), out var mapGrid))
|
||||
return false;
|
||||
|
||||
var tile = mapGrid.GetTileRef(clickLocation);
|
||||
@@ -71,7 +71,7 @@ public sealed partial class ToolSystem
|
||||
|| tile.IsBlockedTurf(true))
|
||||
return false;
|
||||
|
||||
var ev = new LatticeCuttingCompleteEvent(clickLocation);
|
||||
var ev = new LatticeCuttingCompleteEvent(coordinates);
|
||||
return UseTool(toolEntity, user, toolEntity, component.Delay, component.QualityNeeded, ev);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public sealed partial class ToolSystem
|
||||
if (!TryComp<ToolComponent?>(toolEntity, out var tool) && component.ToolComponentNeeded)
|
||||
return false;
|
||||
|
||||
if (!_mapManager.TryGetGrid(clickLocation.GetGridUid(EntityManager), out var mapGrid))
|
||||
if (!_mapManager.TryFindGridAt(clickLocation.ToMap(EntityManager, _transformSystem), out var mapGrid))
|
||||
return false;
|
||||
|
||||
var tile = mapGrid.GetTileRef(clickLocation);
|
||||
@@ -67,7 +67,7 @@ public sealed partial class ToolSystem
|
||||
if (!tileDef.CanCrowbar)
|
||||
return false;
|
||||
|
||||
var ev = new TilePryingDoAfterEvent(clickLocation);
|
||||
var ev = new TilePryingDoAfterEvent(coordinates);
|
||||
|
||||
return UseTool(toolEntity, user, toolEntity, component.Delay, component.QualityNeeded, ev, toolComponent: tool);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user