diff --git a/eid_config.lua b/eid_config.lua index 8957c18c..305d1c84 100644 --- a/eid_config.lua +++ b/eid_config.lua @@ -1,4 +1,4 @@ -EID.DefaultConfig = { +EID.UserConfig = { -------GENERAL--------- -- Change language of the mod. @@ -175,3 +175,58 @@ EID.DefaultConfig = { --END CONFIG-- ----------- ----------- + +-------------------------------------------------- +-------------------------------------------------- +-------------------------------------------------- +-------------------------------------------------- +-------------------------------------------------- +-------- DO NOT EDIT FROM THIS POINT!!!!! -------- +-------------------------------------------------- +-------------------------------------------------- +-------------------------------------------------- +-------------------------------------------------- +-------------------------------------------------- +EID.DefaultConfig = { + ["Language"] = "en_us", + ["TranslateItemName"] = 2, + ["FontType"] = "default", + ["TextboxWidth"] = 100, + ["Scale"] = 1, + ["Transparency"] = 0.75, + ["XPosition"] = 60, + ["YPosition"] = 45, + ["MaxDistance"] = 5, + ["Indicator"] = "none", + ["HideKey"] = Keyboard.KEY_F2, + ["Hidden"] = false, + ["HideInBattle"] = false, + ["DisableObstructionOnFlight"] = true, + ["DisableOnCurse"] = true, + ["DisableOnAltPath"] = true, + ["ShowItemName"] = true, + ["ShowItemType"] = true, + ["ShowItemIcon"] = true, + ["DisplayItemInfo"] = true, + ["DisplayTrinketInfo"] = true, + ["ItemNameColor"] = "ColorEIDObjName", + ["TransformationText"] = true, + ["TransformationIcons"] = true, + ["TransformationColor"] = "ColorEIDTransform", + ["DisplayCardInfo"] = true, + ["DisplayCardInfoShop"] = false, + ["DisplayObstructedCardInfo"] = false, + ["DisplayPillInfo"] = true, + ["DisplayPillInfoShop"] = true, + ["DisplayObstructedPillInfo"] = true, + ["ShowUnidentifiedPillDescriptions"] = false, + ["DisplaySacrificeInfo"] = true, + ["DisplayDiceInfo"] = true, + ["DisplayBagOfCrafting"] = "always", + ["BagOfCraftingResults"] = 7, + ["SpindownDiceResults"] = 3, + ["ErrorMessage"] = "[Effect not defined]", + ["TextColor"] = "ColorEIDText", + ["ErrorColor"] = "ColorEIDError", + ["EnableEntityDescriptions"] = true +} \ No newline at end of file diff --git a/main.lua b/main.lua index cb682443..31ee892c 100644 --- a/main.lua +++ b/main.lua @@ -7,7 +7,7 @@ local enableDebug = false local game = Game() require("eid_config") -EID.Config = EID.DefaultConfig +EID.Config = EID.UserConfig EID.Config.Version = "3.2" EID.isHidden = EID.Config["Hidden"] @@ -653,7 +653,8 @@ local function onRender(t) end -- Handle Bingeeater description addition if player:HasCollectible(664) then - local bingeBuff = EID.descriptions[EID.Config["Language"]]["bingeEaterBuffs"][closest.SubType] or EID.descriptions["en_us"]["bingeEaterBuffs"][closest.SubType] or nil + local translatedDesc = EID.descriptions[EID.Config["Language"]]["bingeEaterBuffs"] + local bingeBuff = (translatedDesc and translatedDesc[closest.SubType]) or EID.descriptions["en_us"]["bingeEaterBuffs"][closest.SubType] or nil if bingeBuff ~= nil then local bingeStr = "#{{Collectible664}} " descriptionObj.Description = descriptionObj.Description..bingeStr..bingeBuff[3]:gsub("#",bingeStr) @@ -730,7 +731,7 @@ end EID:AddCallback(ModCallbacks.MC_POST_RENDER, onRender) -- only save and load configs when using MCM. Otherwise Config file changes arent valid -if EID.MCMLoaded then +if EID.MCMLoaded or REPENTANCE then local json = require("json") -------------------------------- --------Handle Savadata--------- @@ -743,7 +744,9 @@ if EID.MCMLoaded then if savedEIDConfig.Version == EID.Config.Version then for key, value in pairs(EID.Config) do if savedEIDConfig[key] ~= nil then - EID.Config[key] = savedEIDConfig[key] + if (EID.DefaultConfig[key] == value and savedEIDConfig[key] ~= EID.DefaultConfig[key]) or EID.MCMLoaded then + EID.Config[key] = savedEIDConfig[key] + end end end EID.isHidden = EID.Config["Hidden"]