add english-specific desc entry grabber
This commit is contained in:
1 parent
ad0df0d0a1
commit
44a8788f6e
1 file changed
+10
-2
+10
-2
@@ -199,7 +199,8 @@ function EID:addColor(shortcut, kColor, callback)
|
||||
end
|
||||
|
||||
-- Overrides all potentially displayed texts and permanently displays the given texts. Can be turned of again using the "EID:hidePermanentText()" function
|
||||
function EID:displayPermanentText(descriptionObject)
|
||||
function EID:displayPermanentText(descriptionObject, permName1, permName2)
|
||||
descriptionObject.PermanentTextEnglish = EID:getDescriptionEntryEnglish(permName1, permName2)
|
||||
EID.permanentDisplayTextObj = descriptionObject
|
||||
EID.isDisplayingPermanent = true
|
||||
end
|
||||
@@ -367,6 +368,13 @@ function EID:getDescriptionEntry(objTable, objID, noFallback)
|
||||
else return (translatedTable and translatedTable[objID]) or (EID.descriptions["en_us"][objTable] and EID.descriptions["en_us"][objTable][objID]) end
|
||||
end
|
||||
end
|
||||
function EID:getDescriptionEntryEnglish(objTable, objID)
|
||||
if not objID then
|
||||
return EID.descriptions["en_us"][objTable]
|
||||
else
|
||||
return EID.descriptions["en_us"][objTable] and EID.descriptions["en_us"][objTable][objID]
|
||||
end
|
||||
end
|
||||
|
||||
-- returns the description data table related to a given id, variant and subtype
|
||||
-- falls back to english if it doesnt exist
|
||||
@@ -915,7 +923,7 @@ function EID:CheckGlitchedItemConfig(id)
|
||||
local localizedNames = EID:getDescriptionEntry("GlitchedItemText")
|
||||
local item = EID.itemConfig:GetCollectible(id)
|
||||
if not item then return "" end
|
||||
local attributes = ""
|
||||
local attributes = "#"
|
||||
for _,v in ipairs(itemConfigItemAttributes) do
|
||||
local val = item[v]
|
||||
if val ~= 0 then
|
||||
|
||||
Reference in new issue
Block a user