Fix no Flip items after fresh game reload
This commit is contained in:
1 parent
5c433ad018
commit
bba23bcc57
1 file changed
+14
-10
@@ -628,16 +628,7 @@ end
|
|||||||
local isMirrorRoom = false
|
local isMirrorRoom = false
|
||||||
local isDeathCertRoom = false
|
local isDeathCertRoom = false
|
||||||
if REPENTANCE then
|
if REPENTANCE then
|
||||||
function EID:onNewRoom()
|
function EID:AssignFlipItems()
|
||||||
isMirrorRoom = game:GetLevel():GetCurrentRoom():IsMirrorWorld()
|
|
||||||
|
|
||||||
local level = game:GetLevel()
|
|
||||||
local id = level:GetCurrentRoomIndex()
|
|
||||||
isDeathCertRoom = (id >=0 and GetPtrHash(level:GetRoomByIdx(id)) == GetPtrHash(level:GetRoomByIdx(id, 2)))
|
|
||||||
|
|
||||||
-- Handle Flip Item
|
|
||||||
initialItemNext = false
|
|
||||||
flipItemNext = false
|
|
||||||
EID.flipMaxIndex = -1
|
EID.flipMaxIndex = -1
|
||||||
local curRoomIndex = game:GetLevel():GetCurrentRoomIndex()
|
local curRoomIndex = game:GetLevel():GetCurrentRoomIndex()
|
||||||
if EID.flipItemPositions[curRoomIndex] then
|
if EID.flipItemPositions[curRoomIndex] then
|
||||||
@@ -651,6 +642,18 @@ if REPENTANCE then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function EID:onNewRoom()
|
||||||
|
isMirrorRoom = game:GetLevel():GetCurrentRoom():IsMirrorWorld()
|
||||||
|
|
||||||
|
local level = game:GetLevel()
|
||||||
|
local id = level:GetCurrentRoomIndex()
|
||||||
|
isDeathCertRoom = (id >=0 and GetPtrHash(level:GetRoomByIdx(id)) == GetPtrHash(level:GetRoomByIdx(id, 2)))
|
||||||
|
|
||||||
|
-- Handle Flip Item
|
||||||
|
initialItemNext = false
|
||||||
|
flipItemNext = false
|
||||||
|
EID:AssignFlipItems()
|
||||||
|
end
|
||||||
EID:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, EID.onNewRoom)
|
EID:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, EID.onNewRoom)
|
||||||
end
|
end
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
@@ -1279,6 +1282,7 @@ if EID.MCMLoaded or REPENTANCE then
|
|||||||
for k, _ in pairs(configIgnoreList) do
|
for k, _ in pairs(configIgnoreList) do
|
||||||
savedEIDConfig[k] = nil
|
savedEIDConfig[k] = nil
|
||||||
end
|
end
|
||||||
|
EID:AssignFlipItems()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user