From f2aab787a7053704ac3141e8bad14880d3c6b673 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Mon, 1 Jul 2024 22:32:41 -0400 Subject: [PATCH] Add addHorsePill The descriptions are added to pills[] instead of custom[] now because custom receives adjusted subtypes, and was overriding horsepill descriptions --- features/eid_api.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/features/eid_api.lua b/features/eid_api.lua index 3417ecf5..837be95e 100644 --- a/features/eid_api.lua +++ b/features/eid_api.lua @@ -113,7 +113,17 @@ end function EID:addPill(id, description, itemName, language) itemName = itemName or nil language = language or "en_us" - EID.descriptions[language].custom["5.70." .. id+1] = {id+1, itemName, description, EID._currentMod} + EID.descriptions[language].pills[id+1] = {id, itemName, description, EID._currentMod} + -- Default the horsepill to the same description as the base pill, for mods that only define the base pill + if EID.isRepentance and EID.descriptions[language].horsepills[id+1] == nil then + EID.descriptions[language].horsepills[id+1] = {id, itemName, description, EID._currentMod} + end +end +function EID:addHorsePill(id, description, itemName, language) + if not EID.isRepentance then return end + itemName = itemName or nil + language = language or "en_us" + EID.descriptions[language].horsepills[id+1] = {id, itemName, description, EID._currentMod} end -- Adds a metadata for a pilleffect. Used for Placebo/False PHD. Optional parameters: class