From 5d700d6e29ea5d06a1018c083d04e390fcb89379 Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Sun, 31 Oct 2021 18:13:00 +0100 Subject: [PATCH 1/2] Added option to disable the achievement warning --- eid_config.lua | 4 ++++ main.lua | 3 ++- mod_config_menu.lua | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) 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----------------------------------- From 5c1719e45930ce389b13d6f70d705e4d667303ed Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Sun, 31 Oct 2021 18:20:01 +0100 Subject: [PATCH 2/2] Fixed highlighting function on Mega chest entities and made highlights only apply to the item, not the pedestal of items --- main.lua | 72 ++++++++++++++++++++++++++++++---------------------- metadata.xml | 26 +++++++++---------- 2 files changed, 54 insertions(+), 44 deletions(-) diff --git a/main.lua b/main.lua index 79730bc6..058176af 100644 --- a/main.lua +++ b/main.lua @@ -9,7 +9,7 @@ local game = Game() require("eid_config") EID.Config = EID.UserConfig EID.Config.Version = "3.2" -EID.ModVersion = "3.85" +EID.ModVersion = "3.87" EID.DefaultConfig.Version = EID.Config.Version EID.isHidden = false EID.player = nil @@ -404,6 +404,9 @@ function EID:renderIndicator(entity) end local repDiv = 1 local entityPos = Isaac.WorldToScreen(entity.Position) + if entity:GetData() and entity:GetData()["EID_RenderOffset"] then + entityPos = entityPos + entity:GetData()["EID_RenderOffset"] + end local sprite = entity:GetSprite() if REPENTANCE then repDiv = 255 @@ -416,25 +419,8 @@ function EID:renderIndicator(entity) if EID.Config["Indicator"] == "blink" then local c = 255 - math.floor(255 * ((entity.FrameCount % 40) / 40)) sprite.Color = Color(1, 1, 1, 1, c/repDiv, c/repDiv, c/repDiv) - sprite:Render(entityPos, nullVector, nullVector) + EID:renderEntity(entity, sprite, entityPos) sprite.Color = Color(1, 1, 1, 1, 0, 0, 0) - elseif EID.Config["Indicator"] == "border" then - local c = 255 - math.floor(255 * ((entity.FrameCount % 40) / 40)) - sprite.Color = Color(1, 1, 1, 1, c/repDiv, c/repDiv, c/repDiv) - sprite:Render(entityPos + Vector(0, 1), nullVector, nullVector) - sprite:Render(entityPos + Vector(0, -1), nullVector, nullVector) - sprite:Render(entityPos + Vector(1, 0), nullVector, nullVector) - sprite:Render(entityPos + Vector(-1, 0), nullVector, nullVector) - sprite.Color = Color(1, 1, 1, 1, 0, 0, 0) - sprite:Render(entityPos, nullVector, nullVector) - elseif EID.Config["Indicator"] == "highlight" then - sprite.Color = Color(1, 1, 1, 1, 255/repDiv, 255/repDiv, 255/repDiv) - sprite:Render(entityPos + Vector(0, 1), nullVector, nullVector) - sprite:Render(entityPos + Vector(0, -1), nullVector, nullVector) - sprite:Render(entityPos + Vector(1, 0), nullVector, nullVector) - sprite:Render(entityPos + Vector(-1, 0), nullVector, nullVector) - sprite.Color = Color(1, 1, 1, 1, 0, 0, 0) - sprite:Render(entityPos, nullVector, nullVector) elseif EID.Config["Indicator"] == "arrow" then ArrowSprite:Update() local ArrowOffset = Vector(0, -35) @@ -442,6 +428,19 @@ function EID:renderIndicator(entity) ArrowOffset = Vector(0, -62) end ArrowSprite:Render(Isaac.WorldToScreen(entity.Position + ArrowOffset), nullVector, nullVector) + else + if EID.Config["Indicator"] == "border" then + local c = 255 - math.floor(255 * ((entity.FrameCount % 40) / 40)) + sprite.Color = Color(1, 1, 1, 1, c/repDiv, c/repDiv, c/repDiv) + elseif EID.Config["Indicator"] == "highlight" then + sprite.Color = Color(1, 1, 1, 1, 255/repDiv, 255/repDiv, 255/repDiv) + end + EID:renderEntity(entity, sprite, entityPos + Vector(0, 1)) + EID:renderEntity(entity, sprite, entityPos +Vector(0, -1)) + EID:renderEntity(entity, sprite, entityPos + Vector(1, 0)) + EID:renderEntity(entity, sprite, entityPos + Vector(-1, 0)) + sprite.Color = Color(1, 1, 1, 1, 0, 0, 0) + EID:renderEntity(entity, sprite, entityPos) end if REPENTANCE then if isMirrorRoom then @@ -450,6 +449,15 @@ function EID:renderIndicator(entity) end end +function EID:renderEntity(entity, sprite, position) + if entity.Type == 5 and entity.Variant == 100 then + sprite:RenderLayer(1, position, nullVector, nullVector) + else + sprite:Render(position, nullVector, nullVector) + end + +end + function EID:renderHUDLocationIndicators() local mousePos = Isaac.WorldToRenderPosition(Input.GetMousePosition(true)) * 2 Isaac.RenderScaledText("Mouse pos X:"..mousePos.X.." Y:"..mousePos.Y, 100, 10, 0.5, 0.5, 1 ,1 ,1 ,1 ) @@ -497,6 +505,20 @@ EID.hasValidWalkingpath = true function EID:onGameUpdate() EID.player = Isaac.GetPlayer(0) + --Fix Overlapping Pedestals + local curPositions = {} + for _, entity in ipairs(Isaac.FindByType(5, 100, -1, true, false)) do + local pos = entity.Position + for _, otherPos in ipairs(curPositions) do + if pos:Distance(otherPos[2]) == 0 then + entity.Position = entity.Position + Vector(1,0) + entity:GetData()["EID_RenderOffset"] = Vector(10,0) + otherPos[1]:GetData()["EID_RenderOffset"] = Vector(-10,0) + end + end + table.insert(curPositions, {entity, entity.Position}) + end + if not EID.Config["DisplayObstructedCardInfo"] or not EID.Config["DisplayObstructedPillInfo"] or not EID.Config["DisplayObstructedSoulstoneInfo"] then if EID.lastDescriptionEntity == nil or (EID.Config["DisableObstructionOnFlight"] and EID.player.CanFly) then if EID.pathCheckerEntity ~= nil then @@ -520,18 +542,6 @@ function EID:onGameUpdate() end end - --Fix Overlapping Pedestals - local curPositions = {} - for _, entity in ipairs(Isaac.FindByType(5, 100, -1, true, false)) do - local pos = entity.Position - for _, otherPos in ipairs(curPositions) do - if pos:Distance(otherPos) == 0 then - entity.Position = entity.Position + Vector(1,0) - break - end - end - table.insert(curPositions, entity.Position) - end end EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate) diff --git a/metadata.xml b/metadata.xml index 340474ba..4a7c5c41 100644 --- a/metadata.xml +++ b/metadata.xml @@ -1,9 +1,9 @@ - !!~External item descriptions - external item descriptions - 836319872 - [img]https://i.imgur.com/l9nbaxP.png[/img] + !!~External item descriptions + external item descriptions + 836319872 + [img]https://i.imgur.com/l9nbaxP.png[/img] This mod displays detailed information about all items, trinkets, cards, runes and pills DIRECTLY onto your screen. Say goodbye to your browsertab with platinumgod open ;) @@ -90,13 +90,13 @@ https://moddingofisaac.com/mod/1079/external-item-descriptions - Jake for the sweet [b]German[/b] language pack - [url=https://steamcommunity.com/id/whytefang/]adc[/url] for creating an awesome new Languagepack and providing ideas for new functionalities -3.85 -Public - - - - - - - + 3.87 + Public + + + + + + +