Custom Poop API support. (#738)

* Dynamic health HealingRed removal list

HealingRed lines removal for custom health types support

fixed orphan socks description not showing the soul heart markup

Added and changed a lot of stuff from the Spanish EID

* fixed a typo in the Spanish EID

* Custom Poop API support.
This commit is contained in:
Tiburones202 authored and GitHub committed 2024-10-27 21:23:58 +01:00
1 parent b11db096bf
commit 0cf767bc51
4 files changed
+45 -2

No files matched your search

+26
View File
@@ -600,6 +600,32 @@ function EID:ItemReminderHandlePoopSpells(player)
local descsAvailableToRender = numAvailableDescriptionSlots
for i = 0, 5 do -- max 6 poop spell slots
local nextPoop = player:GetPoopSpell(i)
--Custom Poop support
if CustomPoopAPI then
local poopSaveData = CustomPoopAPI.GetPersistentPlayerData(player)
nextPoop = PoopSpellType["SPELL_"..poopSaveData.Poops[i + 1]] --Yes, this works LOL
if nextPoop == nil then --Not a spell from the base game. Might add custom poop support eventually instead of skipping the creep.
nextPoop = PoopSpellType.SPELL_NONE --Prevent from rendering normally
local customPoop = EID:getDescriptionEntry("poopSpells")[poopSaveData.Poops[i + 1]]
local ignoreExisting = false
if customPoop == nil then --If the poop still doesn't exist, use the unkown one instead
customPoop = EID:getDescriptionEntry("poopSpells")["Unknown"] or EID.descriptions["en_us"]["poopSpells"]["Unknown"]
ignoreExisting = true
end
if ignoreExisting or not displayedPoopTypes[customPoop] then
EID:ItemReminderAddTempDescriptionEntry(customPoop[1], customPoop[2], customPoop[3])
displayedPoopTypes[customPoop] = true
descsAvailableToRender = descsAvailableToRender - 1
end
end
end
--End of custom poop support
if not displayedPoopTypes[nextPoop] then
EID:ItemReminderAddTempDescriptionEntry("{{PoopSpell" .. nextPoop .. "}}", poopInfo[nextPoop][1],
poopInfo[nextPoop][2])