From 11afa640239ac0b1fe9e43be4afa1451afe64f78 Mon Sep 17 00:00:00 2001 From: Tiburones202 <103890376+Tiburones202@users.noreply.github.com> Date: Sun, 15 Sep 2024 14:37:32 +0200 Subject: [PATCH 1/2] Dynamic health HealingRed removal list (#725) HealingRed lines removal for custom health types support --- features/eid_data.lua | 5 +++++ features/eid_modifiers.lua | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/features/eid_data.lua b/features/eid_data.lua index 6c7526e7..719d2b62 100644 --- a/features/eid_data.lua +++ b/features/eid_data.lua @@ -1063,6 +1063,11 @@ if EID.isRepentance then EID.CharacterToHeartType[12] = "Black"; EID.CharacterToHeartType[24] = "Black"; EID.CharacterToHeartType[25] = "Soul"; EID.CharacterToHeartType[31] = "None"; EID.CharacterToHeartType[33] = "Coin"; EID.CharacterToHeartType[35] = "Soul"; EID.CharacterToHeartType[36] = "Soul"; EID.CharacterToHeartType[40] = "Soul"; end +EID.HealthTypesWithoutHealing = {} +EID.HealthTypesWithoutHealing["Soul"] = true +EID.HealthTypesWithoutHealing["Black"] = true +EID.HealthTypesWithoutHealing["None"] = true + -- Character IDs that have a pocket active (0 = normal, 1 = timed, 2 = special) EID.PocketActivePlayerIDs = { [22] = 0, [23] = 2, [24] = 1, [25] = 2, [26] = 1, [29] = 0, [34] = 0, [36] = 0, [37] = 1, [38] = 0, [39] = 1 } diff --git a/features/eid_modifiers.lua b/features/eid_modifiers.lua index ea6476bf..e651bc46 100644 --- a/features/eid_modifiers.lua +++ b/features/eid_modifiers.lua @@ -338,7 +338,7 @@ local function HealthUpCallback(descObj) -- remove HealingRed lines entirely for Soul/Black/None health chars descObj.Description = descObj.Description .. "#" -- gsub finds final lines better if the desc ends with a line break - if heartType == "Soul" or heartType == "Black" or heartType == "None" then + if EID.HealthTypesWithoutHealing[heartType] then -- Find any lines containing {{HealingRed}} or {{HealingHalfRed}} and remove the line descObj.Description = descObj.Description:gsub("{{HealingRed}}(.-)#", "") descObj.Description = descObj.Description:gsub("{{HealingHalfRed}}(.-)#", "") From 83c801af72ef30c4ed5992d216703a40441bd35a Mon Sep 17 00:00:00 2001 From: An-Annoying-Cat <57719091+An-Annoying-Cat@users.noreply.github.com> Date: Sun, 15 Sep 2024 07:37:51 -0500 Subject: [PATCH 2/2] position offset is taken into account (#726) --- main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.lua b/main.lua index 67b09f38..8b151a2a 100644 --- a/main.lua +++ b/main.lua @@ -841,7 +841,7 @@ function EID:renderIndicator(entity, playerNum) return end local repDiv = 1 - local entityPos = Isaac.WorldToScreen(entity.Position) + local entityPos = Isaac.WorldToScreen(entity.Position + entity.PositionOffset) local ArrowOffset = Vector(0, -35) if entity.Variant == 100 and not entity:ToPickup():IsShopItem() then ArrowOffset = Vector(0, -62)