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 + + + + + + +