Make some modifier stuff global and add saving

This commit is contained in:
kittenchilly committed 2022-02-09 13:50:46 -06:00
1 parent 38c7826480
commit 392644be1e
3 files changed
+69 -62

No files matched your search

+5
View File
@@ -28,6 +28,7 @@ EID.sacrificeCounter = {}
EID.itemConfig = Isaac.GetItemConfig()
EID.itemUnlockStates = {}
EID.CraneItemType = {}
EID.collectiblesOwned = {}
EID.absorbedItems = {}
EID.CollectedItems = {}
local pathsChecked = {}
@@ -1245,6 +1246,7 @@ if EID.MCMLoaded or REPENTANCE then
["BagFloorContent"] = true,
["CraneItemType"] = true,
["FlipItemPositions"] = true,
["CollectiblesOwned"] = true,
["AbsorbedItems"] = true,
["CollectedItems"] = true,
}
@@ -1269,12 +1271,14 @@ if EID.MCMLoaded or REPENTANCE then
EID.BagItems = {}
EID.CraneItemType = {}
EID.flipItemPositions = {}
EID.collectiblesOwned = {}
EID.absorbedItems = {}
if isSave then
EID.BagItems = savedEIDConfig["BagContent"] or {}
EID.bagOfCraftingRoomQueries = savedEIDConfig["BagFloorContent"] or {}
EID.CraneItemType = savedEIDConfig["CraneItemType"] or {}
EID.collectiblesOwned = savedEIDConfig["AbsorbedItems"] or {}
EID.absorbedItems = savedEIDConfig["AbsorbedItems"] or {}
-- turn list back into dict because json cant save dict indices.
@@ -1336,6 +1340,7 @@ if EID.MCMLoaded or REPENTANCE then
EID.Config["BagContent"] = EID.BagItems or {}
EID.Config["BagFloorContent"] = EID.bagOfCraftingRoomQueries or {}
EID.Config["CraneItemType"] = EID.CraneItemType or {}
EID.Config["CollectiblesOwned"] = EID.collectiblesOwned or {}
EID.Config["AbsorbedItems"] = EID.absorbedItems or {}
-- turn dictionary into list because json cant save dict indices.