You can now pick up items that are not on a grid.

API changes for IMapManager.TryGetGridAt().
This commit is contained in:
Acruid
2020-02-27 02:12:57 -08:00
parent a99919538c
commit 3011c06460
4 changed files with 21 additions and 14 deletions

View File

@@ -126,7 +126,7 @@ namespace Content.Server.GameObjects.EntitySystems
var interactionSystem = _entitySystemManager.GetEntitySystem<InteractionSystem>();
if(interactionSystem.InRangeUnobstructed(coords, ent.Transform.GridPosition, 0f, ignoredEnt:ent))
if(interactionSystem.InRangeUnobstructed(coords.ToMap(_mapManager), ent.Transform.WorldPosition, 0f, ignoredEnt: ent))
if (coords.InRange(_mapManager, ent.Transform.GridPosition, InteractionSystem.InteractionRange))
{
handsComp.Drop(handsComp.ActiveIndex, coords);