Better Death Certificate room detection
This commit is contained in:
1 parent
4866b3f1b6
commit
aade574a43
2 files changed
+14
-4
No files matched your search
+13
@@ -1229,6 +1229,19 @@ function EID:AreAchievementsAllowed()
|
||||
return true
|
||||
end
|
||||
|
||||
function EID:IsDeathCertificateRoom()
|
||||
local level = game:GetLevel()
|
||||
local roomData = level:GetRoomByIdx(level:GetCurrentRoomIndex()).Data
|
||||
if roomData then
|
||||
if roomData.StageID == 35 then -- Home
|
||||
if roomData.SubType == 33 or roomData.SubType == 34 then -- Death Certificate room subtypes
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- Converts a given table into a string containing the crafting icons of the table
|
||||
-- Example input: {1,2,3,4,5,6,7,8}
|
||||
-- Result: "{{Crafting1}}{{Crafting2}}{{Crafting3}}{{Crafting4}}{{Crafting5}}{{Crafting6}}{{Crafting7}}{{Crafting8}}"
|
||||
|
||||
@@ -740,10 +740,7 @@ if REPENTANCE then
|
||||
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)))
|
||||
isDeathCertRoom = EID:IsDeathCertificateRoom()
|
||||
|
||||
-- Handle Flip Item
|
||||
initialItemNext = false
|
||||
|
||||
Reference in new issue
Block a user