From 62b83cd69d486d844b35fb0626d6504bef0a53fb Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Sat, 5 Nov 2022 17:56:51 +0100 Subject: [PATCH] Teleport 2.0 Prediction now supports Mirror world --- eid_holdmapdesc.lua | 2 +- eid_itemprediction.lua | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eid_holdmapdesc.lua b/eid_holdmapdesc.lua index 80a23d28..d2ad3e2e 100644 --- a/eid_holdmapdesc.lua +++ b/eid_holdmapdesc.lua @@ -134,7 +134,7 @@ function EID:getHoldMapDescription(player, checkingTwin) append("{{Collectible44}}", EID:getObjectName(5,100,44) .. EID:getDescriptionEntry("HoldMapHeader"), EID:Teleport1Prediction(getSeed(44))) end -- Teleport 2.0 location - elseif heldActive == 419 and not EID.isMirrorRoom then + elseif heldActive == 419 then blacklist["5.100.419"] = true append("{{Collectible419}}", EID:getObjectName(5,100,419) .. EID:getDescriptionEntry("HoldMapHeader"), EID:Teleport2Prediction()) -- D Infinity diff --git a/eid_itemprediction.lua b/eid_itemprediction.lua index 24a5d755..c4e95572 100644 --- a/eid_itemprediction.lua +++ b/eid_itemprediction.lua @@ -177,12 +177,15 @@ local teleport2Icons = { [1025] = "{{RedRoom}}", [666] = "{{AngelDevilChance}}" function EID:Teleport2Prediction() local level = game:GetLevel() local rooms = level:GetRooms() + local curDimension = EID:GetDimension(level) --I AM ERROR Room always considered uncleared local unclearedTypes = {[3] = true} for i = 0, rooms.Size - 1 do local room = rooms:Get(i) - - if not room.Clear then + + local gridIndex = room.SafeGridIndex + local roomDesc = level:GetRoomByIdx(gridIndex, curDimension) + if roomDesc.ListIndex == i and not room.Clear then -- Check for Special Red Rooms, which get ordered differently than their non-red version if REPENTANCE and room.Data.Type ~= 1 and room.Flags & 1024 == 1024 then unclearedTypes[1025] = true else unclearedTypes[room.Data.Type] = true end