From 8e5e756159837751a31dbdf3935922dc190a968c Mon Sep 17 00:00:00 2001 From: CaptainSqrBeard Date: Sun, 22 Dec 2024 05:14:47 +0600 Subject: [PATCH] reviewe --- .../FromTileCrafter/Systems/FromTileCrafterSystem.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Content.Shared/_CorvaxNext/FromTileCrafter/Systems/FromTileCrafterSystem.cs b/Content.Shared/_CorvaxNext/FromTileCrafter/Systems/FromTileCrafterSystem.cs index 56629a3df6c..94edee20255 100644 --- a/Content.Shared/_CorvaxNext/FromTileCrafter/Systems/FromTileCrafterSystem.cs +++ b/Content.Shared/_CorvaxNext/FromTileCrafter/Systems/FromTileCrafterSystem.cs @@ -25,7 +25,6 @@ public sealed class FromTileCrafterSystem : EntitySystem public override void Initialize() { - base.Initialize(); SubscribeLocalEvent(OnFromTileCraftComplete); SubscribeLocalEvent(OnAfterInteract); } @@ -40,14 +39,13 @@ private void OnFromTileCraftComplete(Entity ent, ref F if (!TryComp(gridUid, out var grid)) return; - var mapGrid = Comp(gridUid); var tileRef = _maps.GetTileRef(gridUid, grid, args.GridTile); var coords = _maps.ToCoordinates(tileRef, grid); - var spread = mapGrid.TileSize * 0.1f; + var spread = grid.TileSize * 0.1f; var offset = new Vector2( - _robustRandom.NextFloat() - 0.5f * spread, - _robustRandom.NextFloat() - 0.5f * spread); + _robustRandom.NextFloat() * spread - 0.5f, + _robustRandom.NextFloat() * spread - 0.5f); if (!_netManager.IsServer) Spawn(ent.Comp.EntityToSpawn, coords.Offset(offset));