diff --git a/eid_config.lua b/eid_config.lua index 212a1545..893b62c6 100644 --- a/eid_config.lua +++ b/eid_config.lua @@ -62,6 +62,9 @@ EID.UserConfig = { -- Toggle obstruction based hiding, when the player has flight -- Default = true ["DisableObstructionOnFlight"] = true, + -- If set to true, the mod will no longer check if the save game has achievements unlocked + -- Default = false + ["DisableAchievementCheck"] = false, -------------CURSE------------- @@ -262,6 +265,7 @@ EID.DefaultConfig = { ["InitiallyHidden"] = false, ["HideInBattle"] = false, ["DisableObstructionOnFlight"] = true, + ["DisableAchievementCheck"] = false, ["DisableOnCurse"] = true, ["DisableOnAltPath"] = true, ["DisableOnAprilFoolsChallenge"] = true, diff --git a/main.lua b/main.lua index 34186b77..79730bc6 100644 --- a/main.lua +++ b/main.lua @@ -537,7 +537,7 @@ EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate) local hasShownAchievementWarning = false local function renderAchievementInfo() - if REPENTANCE and game:GetFrameCount() < 10*30 then + if REPENTANCE and not EID.Config.DisableAchievementCheck and game:GetFrameCount() < 10*30 and game.Challenge == 0 then local hasBookOfRevelationsUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_BOOK_OF_REVELATIONS or CollectibleType.COLLECTIBLE_BOOK_REVELATIONS) if not hasBookOfRevelationsUnlocked then local hasCubeOfMeatUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_CUBE_OF_MEAT) @@ -812,6 +812,7 @@ if EID.MCMLoaded or REPENTANCE then EID.SaveData(EID, json.encode(EID.Config)) EID:hidePermanentText() EID.itemUnlockStates[CollectibleType.COLLECTIBLE_CUBE_OF_MEAT] = nil + EID.itemUnlockStates[CollectibleType.COLLECTIBLE_BOOK_OF_REVELATIONS or CollectibleType.COLLECTIBLE_BOOK_REVELATIONS] = nil end EID:AddCallback(ModCallbacks.MC_PRE_GAME_EXIT, SaveGame) end diff --git a/mod_config_menu.lua b/mod_config_menu.lua index 0cffeafd..ddf42d5f 100644 --- a/mod_config_menu.lua +++ b/mod_config_menu.lua @@ -354,6 +354,29 @@ if MCMLoaded then Info = {"Distance to the object until descriptions are displayed."} } ) + + -- disable achievements + MCM.AddSetting( + "EID", + "General", + { + Type = ModConfigMenu.OptionType.BOOLEAN, + CurrentSetting = function() + return EID.Config["DisableAchievementCheck"] + end, + Display = function() + local onOff = "Enabled" + if EID.Config["DisableAchievementCheck"] then + onOff = "Disabled" + end + return "Achievement warning: " .. onOff + end, + OnChange = function(currentBool) + EID.Config["DisableAchievementCheck"] = currentBool + end, + Info = {"Use this to turn off the achievement warning"} + } + ) --------------------------------------------------------------------------- ---------------------------------Display-----------------------------------