Overhaul eid_modifiers

This commit is contained in:
Buurazu authored and GitHub committed 2022-01-20 23:56:26 -05:00
1 parent 65d9a98001
commit 448f4d2233
1 file changed
+7 -2
+7 -2
View File
@@ -324,8 +324,13 @@ function EID:getDescriptionObj(Type, Variant, SubType, entity)
description.ModName = tableEntry and tableEntry[4]
description.ModName = tableEntry and tableEntry[4]
for k,modifier in pairs(EID.DescModifiers) do
if modifier.condition(description) then
for _,modifier in pairs(EID.DescModifiers) do
local result = modifier.condition(description)
if type(result) == "table" then
for _,callback in ipairs(result) do
description = callback(description)
end
elseif result then
description = modifier.callback(description)
end
end