Revert "Add full proof check for if achievements are enabled"

This reverts commit 2f6b9872c7.
This commit is contained in:
Wofsauge committed 2022-02-03 21:57:19 +01:00
1 parent e58a775a0c
commit 1d4aa87300
3 files changed
+17 -23

No files matched your search

+16 -19
View File
@@ -21,7 +21,6 @@ EID.UsedPosition = Vector(EID.Config["XPosition"], EID.Config["YPosition"])
EID.Scale = EID.Config["Size"]
EID.isDisplaying = false
EID.isDisplayingPermanent = false
EID.achievementsEnabled = false
EID.permanentDisplayTextObj = nil
EID.lastDescriptionEntity = nil
EID.lineHeight = 11
@@ -912,15 +911,6 @@ local function attemptPathfind(entity)
return success
end
local achievementTrinket = Isaac.GetTrinketIdByName("EID Achievements Locked Check")
-- hide helper trinket in Encyclopedia mod
if Encyclopedia then
Encyclopedia.AddTrinket({
ID = achievementTrinket,
Hide = true,
})
end
local hasShownAchievementWarning = false
local function renderAchievementInfo()
if REPENTANCE and not EID.Config.DisableAchievementCheck and game:GetFrameCount() < 10*30 then
@@ -940,12 +930,22 @@ local function renderAchievementInfo()
EID:displayPermanentText(demoDescObj)
hasShownAchievementWarning = true
-- Achievements Locked Check (do we have Cube of Meat or Book of Revelations unlocked?)
elseif not EID.achievementsEnabled 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
else
local characterID = EID.player:GetPlayerType()
--ID 21 = Tainted Isaac. Tainted characters have definitely beaten Mom! (Fixes Tainted Lost's item pools ruining this check)
if characterID < 21 and game.Challenge == 0 and not EID:PlayersHaveCollectible(CollectibleType.COLLECTIBLE_TMTRAINER) 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)
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
end
end
end
elseif hasShownAchievementWarning then
EID:hidePermanentText()
@@ -1313,9 +1313,6 @@ if EID.MCMLoaded or REPENTANCE then
end
end
end
-- Check and set if achievements are enabled
EID.achievementsEnabled = game:GetItemPool():RemoveTrinket(achievementTrinket)
end
EID:AddCallback(ModCallbacks.MC_POST_GAME_STARTED, OnGameStart)