From c1a21693fad74eec8f2cb4945be0b962ede228a1 Mon Sep 17 00:00:00 2001
From: B_Kirill <153602297+B-Kirill@users.noreply.github.com>
Date: Tue, 23 Sep 2025 12:52:51 +1000
Subject: [PATCH] Cleanup warnings: Use TransformSystem for anchoring (#39778)
* Cleanup
* Bonus
* I hope this helps
* Revert
---
.../Administration/UI/AdminCamera/AdminCameraWindow.xaml | 3 +--
Content.Server/StationEvents/Events/ImmovableRodRule.cs | 3 ++-
Content.Shared/Coordinates/Helpers/SnapgridHelper.cs | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Content.Client/Administration/UI/AdminCamera/AdminCameraWindow.xaml b/Content.Client/Administration/UI/AdminCamera/AdminCameraWindow.xaml
index 87583cef97..a6ac34bb29 100644
--- a/Content.Client/Administration/UI/AdminCamera/AdminCameraWindow.xaml
+++ b/Content.Client/Administration/UI/AdminCamera/AdminCameraWindow.xaml
@@ -1,6 +1,5 @@
+ MinSize="200 225">
diff --git a/Content.Server/StationEvents/Events/ImmovableRodRule.cs b/Content.Server/StationEvents/Events/ImmovableRodRule.cs
index 5e324a529b..83ab077236 100644
--- a/Content.Server/StationEvents/Events/ImmovableRodRule.cs
+++ b/Content.Server/StationEvents/Events/ImmovableRodRule.cs
@@ -35,7 +35,8 @@ public sealed class ImmovableRodRule : StationEventSystem();
- var gridId = coordinates.GetGridUid(entMan);
+ var gridId = xformSys.GetGrid(coordinates.EntityId);
if (gridId == null)
{
- var xformSys = entMan.System();
var mapPos = xformSys.ToMapCoordinates(coordinates);
var mapX = (int)Math.Floor(mapPos.X) + 0.5f;
var mapY = (int)Math.Floor(mapPos.Y) + 0.5f;
@@ -24,11 +24,11 @@ namespace Content.Shared.Coordinates.Helpers
var grid = entMan.GetComponent(gridId.Value);
var tileSize = grid.TileSize;
- var localPos = coordinates.WithEntityId(gridId.Value).Position;
+ var localPos = xformSys.WithEntityId(coordinates, gridId.Value).Position;
var x = (int)Math.Floor(localPos.X / tileSize) + tileSize / 2f;
var y = (int)Math.Floor(localPos.Y / tileSize) + tileSize / 2f;
var gridPos = new EntityCoordinates(gridId.Value, new Vector2(x, y));
- return gridPos.WithEntityId(coordinates.EntityId);
+ return xformSys.WithEntityId(gridPos, coordinates.EntityId);
}
public static EntityCoordinates SnapToGrid(this EntityCoordinates coordinates, MapGridComponent grid)
--
2.51.2