From 740f8e06b3d044dd5540e66af52cdd6263af307e Mon Sep 17 00:00:00 2001 From: wofsauge Date: Mon, 6 Apr 2020 18:33:20 +0200 Subject: [PATCH] Fixed issue where loading old config files caused new config options to disappear --- main.lua | 8 ++++++-- metadata.xml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/main.lua b/main.lua index 1d77c73a..252dd577 100644 --- a/main.lua +++ b/main.lua @@ -316,7 +316,7 @@ local hideDescToggle= false -- check if an entity is part of the describable entities local function isEntityAllowed(entity) - local isAllowed = false + local isAllowed = false isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_COLLECTIBLE and EIDConfig["DisplayItemInfo"]) isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TRINKET and EIDConfig["DisplayTrinketInfo"]) isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TAROTCARD and EIDConfig["DisplayCardInfo"]) @@ -469,7 +469,11 @@ local json = require("json") function OnGameStart(isSave) --Loading Moddata-- if EID:HasData() then - EIDConfig = json.decode(Isaac.LoadModData(EID)) + savedEIDConfig = json.decode(Isaac.LoadModData(EID)) + + for key, value in pairs(EIDConfig) do + if savedEIDConfig[key]~=nil then EIDConfig[key]=savedEIDConfig[key] end + end end end EID:AddCallback(ModCallbacks.MC_POST_GAME_STARTED, OnGameStart) diff --git a/metadata.xml b/metadata.xml index e39ff62b..1f459fb8 100644 --- a/metadata.xml +++ b/metadata.xml @@ -60,7 +60,7 @@ Same as aboth but the path is: /home/%YourUsernameHere%/.steam/steam/steamapps/w - Rickyy for creating the incredible polish language pack - Marcelino Cruz for creating the portuguese language pack - [url=https://steamcommunity.com/id/whytefang/]adc[/url] for creating a awesome new Languagepack and providing ideas for new functionalities - 1.63 + 1.65 Public