Better Death Certificate room detection

This commit is contained in:
kittenchilly committed 2022-04-26 13:02:12 -05:00
1 parent 4866b3f1b6
commit aade574a43
2 files changed
+14 -4

No files matched your search

+13
View File
@@ -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}}"