From bb94e101a32b42066b58f5881ff6ccc52065b89a Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Mon, 28 Oct 2024 19:58:19 +0100 Subject: [PATCH] Added mod indicator to custom poop --- features/eid_api.lua | 2 +- features/eid_holdmapdesc.lua | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/features/eid_api.lua b/features/eid_api.lua index 3dfd2db4..c8357e32 100644 --- a/features/eid_api.lua +++ b/features/eid_api.lua @@ -287,7 +287,7 @@ end -- Language is the language you want to add it to. Examples: "en_us", "spa", "ru". -- EXAMPLE: EID:addCustomPoopSpell("MYPOOP", "I Made This Poop", "{{PoopSpell1}}", "Can be throwed to deal damage", "en_us") function EID:addCustomPoopSpell(token, name, icon, description, language) - EID.descriptions[language]["poopSpells"][token] = {icon, name, description} + EID.descriptions[language]["poopSpells"][token] = {icon, name, description, EID._currentMod} end -- Adds a new color object with the shortcut defined in the "shortcut" variable (e.g. "{{shortcut}}" = your color) diff --git a/features/eid_holdmapdesc.lua b/features/eid_holdmapdesc.lua index 91e600d7..743c94cb 100644 --- a/features/eid_holdmapdesc.lua +++ b/features/eid_holdmapdesc.lua @@ -616,10 +616,13 @@ function EID:ItemReminderHandlePoopSpells(player) end if ignoreExisting or not displayedPoopTypes[customPoop] then - EID:ItemReminderAddTempDescriptionEntry(customPoop[1], customPoop[2], customPoop[3]) + local poopName = customPoop[2] + if customPoop[4] then + poopName = poopName + EID:getModNameString({ ["ModName"] = customPoop[4] }) + end + EID:ItemReminderAddTempDescriptionEntry(customPoop[1], poopName, customPoop[3]) displayedPoopTypes[customPoop] = true - descsAvailableToRender = descsAvailableToRender - 1 end end