fix: Deactivate modular descriptions for item descs overriden by other mods
This commit is contained in:
1 parent
2caeaa2767
commit
13ba58808f
1 file changed
+42
-12
+42
-12
@@ -133,9 +133,15 @@ function EID:addCollectible(id, description, itemName, language)
|
||||
local modName = EID._currentMod
|
||||
-- Glitched Items exception so they don't have a mod name
|
||||
if id > 4294960000 then modName = nil end
|
||||
local fullID = "5.100." .. id
|
||||
if EID.FullyAutomatedDescriptions[fullID] then
|
||||
EID.FullyAutomatedDescriptions[fullID] = nil -- remove vanilla item id from the modular desc list, since it got overriden by this function.
|
||||
end
|
||||
EID:CreateDescriptionTableIfMissing("custom", language)
|
||||
EID.descriptions[language].custom["5.100." .. id] = {id, itemName, description, modName}
|
||||
EID.ItemNames[language]["5.100." .. id] = itemName
|
||||
EID.descriptions[language].custom[fullID] = {id, itemName, description, modName}
|
||||
if itemName then
|
||||
EID.ItemNames[language][fullID] = itemName
|
||||
end
|
||||
end
|
||||
|
||||
---Adds a description for a trinket.
|
||||
@@ -150,9 +156,15 @@ function EID:addTrinket(id, description, itemName, language)
|
||||
EID:WriteErrorMsg("Trying to add trinket description to id = -1, which is not allowed! (Name: "..tostring(itemName).."; Description: "..tostring(description)..")")
|
||||
return
|
||||
end
|
||||
local fullID = "5.350." .. id
|
||||
if EID.FullyAutomatedDescriptions[fullID] then
|
||||
EID.FullyAutomatedDescriptions[fullID] = nil -- remove vanilla item id from the modular desc list, since it got overriden by this function.
|
||||
end
|
||||
EID:CreateDescriptionTableIfMissing("custom", language)
|
||||
EID.descriptions[language].custom["5.350." .. id] = {id, itemName, description, EID._currentMod}
|
||||
EID.ItemNames[language]["5.350." .. id] = itemName
|
||||
EID.descriptions[language].custom[fullID] = {id, itemName, description, EID._currentMod}
|
||||
if itemName then
|
||||
EID.ItemNames[language][fullID] = itemName
|
||||
end
|
||||
end
|
||||
|
||||
---Adds character specific information, which can be viewed in the Item Reminder
|
||||
@@ -245,9 +257,15 @@ function EID:addCard(id, description, itemName, language)
|
||||
EID:WriteErrorMsg("Trying to add card description to id = -1, which is not allowed! (Name: "..tostring(itemName).."; Description: "..tostring(description)..")")
|
||||
return
|
||||
end
|
||||
local fullID = "5.300." .. id
|
||||
if EID.FullyAutomatedDescriptions[fullID] then
|
||||
EID.FullyAutomatedDescriptions[fullID] = nil -- remove vanilla item id from the modular desc list, since it got overriden by this function.
|
||||
end
|
||||
EID:CreateDescriptionTableIfMissing("custom", language)
|
||||
EID.descriptions[language].custom["5.300." .. id] = {id, itemName, description, EID._currentMod}
|
||||
EID.ItemNames[language]["5.300." .. id] = itemName
|
||||
EID.descriptions[language].custom[fullID] = {id, itemName, description, EID._currentMod}
|
||||
if itemName then
|
||||
EID.ItemNames[language][fullID] = itemName
|
||||
end
|
||||
end
|
||||
|
||||
-- DEPRECATED! Does nothing! Don't use!
|
||||
@@ -268,14 +286,20 @@ function EID:addPill(id, description, itemName, language)
|
||||
EID:WriteErrorMsg("Trying to add pill description to id = -1, which is not allowed! (Name: "..tostring(itemName).."; Description: "..tostring(description)..")")
|
||||
return
|
||||
end
|
||||
local fullID = "5.70." .. id
|
||||
if EID.FullyAutomatedDescriptions[fullID] then
|
||||
EID.FullyAutomatedDescriptions[fullID] = nil -- remove vanilla item id from the modular desc list, since it got overriden by this function.
|
||||
end
|
||||
EID:CreateDescriptionTableIfMissing("pills", language)
|
||||
EID:CreateDescriptionTableIfMissing("horsepills", language)
|
||||
EID.descriptions[language].pills[id+1] = {id, 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}
|
||||
if EID.isRepentance and EID.descriptions[language].horsepills[id + 1] == nil then
|
||||
EID.descriptions[language].horsepills[id + 1] = {id, itemName, description, EID._currentMod}
|
||||
end
|
||||
if itemName then
|
||||
EID.ItemNames[language][fullID] = itemName
|
||||
end
|
||||
EID.ItemNames[language]["5.70." .. id] = itemName
|
||||
end
|
||||
|
||||
---Adds a horsepill-specific description for a PillEffect
|
||||
@@ -291,9 +315,15 @@ function EID:addHorsePill(id, description, itemName, language)
|
||||
EID:WriteErrorMsg("Trying to add horsepill description to id = -1, which is not allowed! (Name: "..tostring(itemName).."; Description: "..tostring(description)..")")
|
||||
return
|
||||
end
|
||||
local fullID = "5.70." .. id
|
||||
if EID.FullyAutomatedDescriptions[fullID] then
|
||||
EID.FullyAutomatedDescriptions[fullID] = nil -- remove vanilla item id from the modular desc list, since it got overriden by this function.
|
||||
end
|
||||
EID:CreateDescriptionTableIfMissing("horsepills", language)
|
||||
EID.descriptions[language].horsepills[id+1] = {id, itemName, description, EID._currentMod}
|
||||
EID.ItemNames[language]["5.70." .. id] = itemName
|
||||
EID.descriptions[language].horsepills[id + 1] = {id, itemName, description, EID._currentMod}
|
||||
if itemName then
|
||||
EID.ItemNames[language][fullID] = itemName
|
||||
end
|
||||
end
|
||||
|
||||
---Adds a metadata for a pilleffect. Used for Placebo/False PHD
|
||||
|
||||
Reference in new issue
Block a user