ElEditors, Interface administrators, Administrators
70,888
edits
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 271: | Line 271: | ||
-- Function to apply inheritance for a specific damage type and argument | -- Function to apply inheritance for a specific damage type and argument | ||
local function applyInheritance(mainArgValues, inheritArg, mainArgValue, inheritValue) | local function applyInheritance(mainArgValues, inheritArg, mainArgValue, inheritValue, mainKeyPrefixed, inheritKeyPrefixed) | ||
if mainArgValue == '' then | if mainArgValue == '' then | ||
return inheritValue | return inheritValue | ||
Line 294: | Line 294: | ||
for ix, inheritKey in ipairs(argTable) do | for ix, inheritKey in ipairs(argTable) do | ||
local inheritArg = args[prefix .. inheritKey .. damageType] or args[inheritKey .. damageType] or args[prefix .. inheritKey] or args[inheritKey] | local inheritArg = (inheritKey .. damageType) ~= mainKey and (args[prefix .. inheritKey .. damageType] or args[inheritKey .. damageType]) or (args[prefix .. inheritKey] or args[inheritKey]) | ||
if inheritArg and inheritArg[i] and inheritArg[i] ~= '' and ix ~= 1 then | if inheritArg and inheritArg[i] and inheritArg[i] ~= '' and ix ~= 1 then |