Check for challenges

This commit is contained in:
theo@manjaro 2023-06-28 20:30:31 +02:00
parent 6f91218f68
commit f78740be7d
2 changed files with 23 additions and 16 deletions

View File

@ -16,6 +16,9 @@ function mod:isCurseBlind()
end
function mod.isIdNotTakenAlready(id)
-- Always returns seen if on a challenge
if Isaac.GetChallenge()~=0 then return false end
if id>=1 and id<=save.settings.maxid then
return not save.seen[id]
end
@ -31,21 +34,24 @@ function mod.isIdNotTakenAlready(id)
end
function mod.registerTouched(id)
if id>=1 and id<=save.settings.maxid then
save:touchid(id)
end
if id >=save.settings.maxid then
-- Modded item, save them by name
-- (as IDs are choosen manually by the game, and may vary when changing mods)
local itemconfig = Isaac.GetItemConfig():GetCollectible(id)
if itemconfig then
local name = itemconfig.Name
save:touchname(name)
-- Only register when not on a challenge
if Isaac.GetChallenge()==0 then
if id>=1 and id<=save.settings.maxid then
save:touchid(id)
end
if id >=save.settings.maxid then
-- Modded item, save them by name
-- (as IDs are choosen manually by the game, and may vary when changing mods)
local itemconfig = Isaac.GetItemConfig():GetCollectible(id)
if itemconfig then
local name = itemconfig.Name
save:touchname(name)
end
end
end
-- Save
mod:save()
-- Save
mod:save()
end
end
-- Used to check if EID's description should be modified

View File

@ -3,7 +3,7 @@
<name>DeadGod Helper</name>
<directory>deadgod helper</directory>
<id>2985754961</id>
<description>A small mod for The Binding Of Isaac: Repentance!
<description>Spot missing items!
Easily spot items that were not previously picked up on this savefile. Very useful when you're trying to get a second or third Dead God.
@ -16,7 +16,7 @@ It is also compatible with Mod Config Menu, if you want to toggle things (such a
Since mods can't directly access the savefile, this mod takes it upon itself to track wich items are picked up. This means that the first time you install this mod, everything will be marked as unseen.
Turns out EID already has a some support for this, using a save extractor. If you want to go down that route, here's the link to the extractor : https://github.com/wofsauge/External-Item-Descriptions/tree/master/scripts
Turns out EID already has some support for this, using a save extractor. If you want to go down that route, here's the link to the extractor : https://github.com/wofsauge/External-Item-Descriptions/tree/master/scripts
However, EID's save extractor doesn't really work on Linux, so I made a port of it in python, in order to be more easily ran. This port is available here : https://forge.chapril.org/ayte/DeadGodHelper/src/branch/main/SaveExtractor
This port can also extract save file's info to be used for Dead God Helper.
@ -26,8 +26,9 @@ This mod is still relevant in itself if you do not want to use external tools, o
Anyway, I hope that this mod will be useful to someone :)
Source code is available at https://forge.chapril.org/ayte/DeadGodHelper</description>
<version>1.11</version>
<version>1.12</version>
<visibility>Public</visibility>
<tag id="Items"/>
<tag id="Tweaks"/>
<tag id="Graphics"/>
</metadata>