From 045bb719808c32e2c7bd3455160478ede4223934 Mon Sep 17 00:00:00 2001 From: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Date: Sat, 6 Mar 2021 09:43:32 -0800 Subject: [PATCH] Fix trying to create a new grid on MapId.Nullspace (#3541) --- .../GameObjects/Components/Items/FloorTileItemComponent.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs b/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs index 81d3941be8..0db674381d 100644 --- a/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs +++ b/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs @@ -1,4 +1,4 @@ -using Content.Server.GameObjects.Components.Stack; +using Content.Server.GameObjects.Components.Stack; using Content.Shared.Audio; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Maps; @@ -62,6 +62,8 @@ namespace Content.Server.GameObjects.Components.Items var location = eventArgs.ClickLocation.AlignWithClosestGridTile(); var locationMap = location.ToMap(Owner.EntityManager); + if (locationMap.MapId == MapId.Nullspace) + return true; mapManager.TryGetGrid(location.GetGridId(Owner.EntityManager), out var mapGrid); foreach (var currentTile in _outputTiles) {