Module:HeroData: Difference between revisionsGive feedback
Jump to navigation
Jump to search
m calling lang module |
m bugfixes |
||
| Line 88: | Line 88: | ||
local infobox_attributes = { | local infobox_attributes = { | ||
Weapon = {"DPS", "ClipSize", "RoundsPerSecond", "ReloadTime"}, | Weapon = {"DPS", "ClipSize", "RoundsPerSecond", "ReloadTime"}, | ||
Vitality = {"MaxHealth", " | Vitality = {"MaxHealth", "BulletArmorDamageReduction", "TechArmorDamageReduction", "MaxMoveSpeed"} | ||
} | } | ||
| Line 107: | Line 107: | ||
-- Iterate stats | -- Iterate stats | ||
for _, stat_name in ipairs(stats) do | for _, stat_name in ipairs(stats) do | ||
attribute_data = attributes_data[category] | |||
if (stat_data == nil) then return "Attribute in infobox_attributes is not in Data:AttributeData" end | if (attribute_data == nil) then return "Category " .. category .. " in infobox_attributes is not in Data:AttributeData" end | ||
stat_data = attribute_data[stat_name] | |||
if (stat_data == nil) then return "Attribute " .. stat_name .. " in infobox_attributes is not in Data:AttributeData" end | |||
-- gets the stat's value | -- gets the stat's value | ||