Added option to disable the achievement warning

This commit is contained in:
Wofsauge committed 2021-10-31 18:13:00 +01:00
1 parent e9e9751913
commit 5d700d6e29
3 files changed
+29 -1

No files matched your search

+4
View File
@@ -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,
+2 -1
View File
@@ -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
+23
View File
@@ -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-----------------------------------