Health Up modifier for non-red characters + misc (#710)

* Health up / different effect modifiers

* ClosestPlayerTo, move utility functions

* ClosestPlayer adds to DifferentEffectPlayers table

* More data tables for Health Ups

* useless Lost items, comment the health mod atm

* HealingRed, RedToX

* HealingRed added

* Moving Pluralize

* oops

* Move Pluralize

* Move Pluralize

* allow choosing the position of modifiers in the table

* default layer to 0

* Changes to no red char conditions

* Support healing items in the modifier

* tweaks to health up data

* Support {1} in Result Header

* {1} in ResultHeader

* Tweak binge eater wording

* reword comment
This commit is contained in:
Buurazu authored and GitHub committed 2024-08-19 19:52:56 +02:00
1 parent 9d8a2ae730
commit e271302f69
29 files changed
+355 -230

No files matched your search

+4 -2
View File
@@ -30,11 +30,12 @@ local function entityToName(Type, Variant, plural)
local eWithZero = string.gsub(e, "-1", "0")
local localizedNames = EID:getDescriptionEntry("GlitchedItemText")
local pluralize = EID:getDescriptionEntry("Pluralize")
local name = localizedNames[e] or localizedNames[eWithZero] or EID:GetEntityXMLName(Type, Variant, 0) or e
--print out entities with no name yet
if name == e then Isaac.DebugString("No name found for " .. e .. " (could be modded)")
elseif plural then name = name .. localizedNames["pluralize"] end
elseif plural then name = name .. pluralize end
return name
end
@@ -53,6 +54,7 @@ function EID:CheckGlitchedItemConfig(id)
local localizedNames = EID:getDescriptionEntry("GlitchedItemText")
local localizedNamesEnglish = EID:getDescriptionEntryEnglish("GlitchedItemText")
local pluralize = EID:getDescriptionEntry("Pluralize")
local attributes = "#"
-- Check the base item config for the Hearts/Bombs/Coins/Keys this item adds,
@@ -83,7 +85,7 @@ function EID:CheckGlitchedItemConfig(id)
local prefix = "↑ "
if val > 0 then s = "+" .. s else prefix = "↓ " end
attributes = attributes .. prefix .. EID:ReplaceVariableStr(localizedNames[v] or localizedNamesEnglish[v], 1, s)
if val ~= 1 and val ~= -1 then attributes = attributes .. localizedNames["pluralize"] or localizedNamesEnglish["pluralize"] end
if val ~= 1 and val ~= -1 then attributes = attributes .. pluralize end
attributes = attributes .. "#"
end
end