add getDescriptionDataEnglish

This commit is contained in:
Buurazu authored and Wofsauge committed 2024-06-03 18:39:47 +02:00
1 parent b62acf9b76
commit b3a649c2f8
1 file changed
+11 -1
+11 -1
View File
@@ -511,6 +511,16 @@ function EID:getDescriptionData(Type, Variant, SubType)
return moddedDesc or legacyModdedDescription or defaultDesc
end
function EID:getDescriptionDataEnglish(Type, Variant, SubType)
local fullString = Type.."."..Variant
local adjustedID = EID:getAdjustedSubtype(Type, Variant, SubType)
local moddedDesc = EID:getDescriptionEntryEnglish("custom", fullString.."."..adjustedID)
local tableName = EID:getTableName(Type, Variant, SubType)
local legacyModdedDescription = EID:getLegacyModDescription(Type, Variant, adjustedID)
local defaultDesc = EID:getDescriptionEntryEnglish(tableName, adjustedID)
return moddedDesc or legacyModdedDescription or defaultDesc
end
-- Returns an adjusted SubType id for special cases like Horse Pills and Golden Trinkets
function EID:getAdjustedSubtype(Type, Variant, SubType)
@@ -2040,4 +2050,4 @@ function EID:UpdateAllPlayerPassiveItems()
end
end
return listUpdatedForPlayers
end
end