diff --git a/descriptions/rep/en_us.lua b/descriptions/rep/en_us.lua index 91173a68..e0d5869d 100644 --- a/descriptions/rep/en_us.lua +++ b/descriptions/rep/en_us.lua @@ -675,3 +675,5 @@ EID.descriptions["en_us"].CraftingFloorContent = "Floor:" EID.descriptions["en_us"].CraftingResults = "(Scroll: hold {{CONFIG_BoC_Toggle}} + {{ButtonY}} {{ButtonA}},#Lock: {{ButtonX}}, Refresh: {{ButtonB}})" EID.descriptions["en_us"].CraftingBagModError = "!!! {{ColorRed}}ERROR:#{{ColorRed}}The \"Crafting result calculation\" feature currently does not work when item mods are installed!#{{ColorRed}}Please uninstall the item mods or deactivate the Bag of Crafting descriptions in the config" +EID.descriptions["en_us"].AchievementWarningTitle = "{{ColorYellow}}!!! WARNING !!!" +EID.descriptions["en_us"].AchievementWarningText = "Achievements are disabled!#In order to enable progression and achievements, you first need to kill Mom (Depths II) without any mods enabled." diff --git a/main.lua b/main.lua index f97b4bd1..7c4f8d80 100644 --- a/main.lua +++ b/main.lua @@ -535,6 +535,22 @@ function EID:onGameUpdate() end EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate) +local hasShownAchievementWarning = false +local function renderAchievementInfo() + if game:GetFrameCount() < 10*30 then + local hasCubeOfMeatUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_CUBE_OF_MEAT) + if not hasCubeOfMeatUnlocked then + local demoDescObj = EID:getDescriptionObj(-999, -1, 1) + demoDescObj.Name = EID:getDescriptionEntry("AchievementWarningTitle") or "" + demoDescObj.Description = EID:getDescriptionEntry("AchievementWarningText") or "" + EID:displayPermanentText(demoDescObj) + hasShownAchievementWarning = true + end + elseif hasShownAchievementWarning then + EID:hidePermanentText() + end +end + --------------------------------------------------------------------------- ---------------------------On Render Function------------------------------ @@ -550,6 +566,7 @@ local function onRender(t) end EID:renderMCMDummyDescription() + renderAchievementInfo() EID.player = Isaac.GetPlayer(0) if EID.GameVersion == "ab+" then @@ -790,6 +807,8 @@ if EID.MCMLoaded or REPENTANCE then EID.Config["BagFloorContent"] = EID.bagOfCraftingRoomQueries or {} end EID.SaveData(EID, json.encode(EID.Config)) + EID:hidePermanentText() + EID.itemUnlockStates[CollectibleType.COLLECTIBLE_CUBE_OF_MEAT] = nil end EID:AddCallback(ModCallbacks.MC_PRE_GAME_EXIT, SaveGame) end