From 97850cc00ac0dbd5dda91f87ab1fbd40dae28f95 Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Sun, 23 May 2021 20:21:23 +0200 Subject: [PATCH] Fixes overlapping pedestals and mega chest item descriptions --- main.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/main.lua b/main.lua index 7fbd3862..cb682443 100644 --- a/main.lua +++ b/main.lua @@ -497,6 +497,19 @@ function EID:onGameUpdate() EID.hasValidWalkingpath = EID.pathCheckerEntity:ToNPC().Pathfinder:HasPathToPos ( EID.lastDescriptionEntity.Position, false ) end end + + --Fix Overlapping Pedestals + local curPositions = {} + for _, entity in ipairs(Isaac.FindByType(5, 100, -1, true, false)) do + local pos = entity.Position + for _, otherPos in ipairs(curPositions) do + if pos:Distance(otherPos) == 0 then + entity.Position = entity.Position + Vector(1,0) + break + end + end + table.insert(curPositions, entity.Position) + end end EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate)