New promo images & save fix

This commit is contained in:
theo@manjaro 2023-06-09 12:04:22 +02:00
parent e9deb2de19
commit 2d46b7ad6c
3 changed files with 18 additions and 2 deletions

View File

@ -3,7 +3,8 @@ local mod = RegisterMod(modname, 1)
local math = require("math")
mod.print = Isaac.ConsoleOutput
mod.game = Game()
local save = include("save"):new()
local savegen = include("save")
local save = savegen:new()
local json = include("json")
local DEBUG = false
@ -119,12 +120,23 @@ function mod:newrun()
if DEBUG then
mod.print(data.."\n")
end
save = savegen:new()
save:load(json, data)
local c = 0
for _,v in ipairs(save.seen) do
if v then c = c+1 end
end
mod.print(modname.." Loaded, "..c.." items seen\n")
mod.print(modname.." loaded, "..c.." vanilla items seen")
if save.settings.showonmodded then
local c = 0
for _,v in pairs(save.seenmodded) do
if v then
c = c + 1
end
end
mod.print(", "..tostring(c).." modded")
end
mod.print(".\n")
end
end
@ -195,6 +207,10 @@ if ModConfigMenu then
end,
OnChange = function(b)
save.settings.showonmodded = b
if b==false then
-- Reset modded items
save.seenmodded = {}
end
mod:save()
end,
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 199 KiB

BIN
workshop/preview3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB