diff --git a/main.lua b/main.lua index bb5e0b0..a3dd9eb 100644 --- a/main.lua +++ b/main.lua @@ -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, } diff --git a/workshop/preview2.png b/workshop/preview2.png index a676b7c..9e5c8ac 100644 Binary files a/workshop/preview2.png and b/workshop/preview2.png differ diff --git a/workshop/preview3.png b/workshop/preview3.png new file mode 100644 index 0000000..eda8f47 Binary files /dev/null and b/workshop/preview3.png differ