Module:HeroData: Difference between revisionsGive feedback
Jump to navigation
Jump to search
m hero != hero_data typo |
m round scaling value to 3 sigfigs |
||
| Line 1: | Line 1: | ||
local p = {}; | local p = {}; | ||
local data = mw.loadJsonData("Data:HeroData.json") | local data = mw.loadJsonData("Data:HeroData.json") | ||
local utils_module = require('Module:Utilities') | |||
-- returns the table of a specific item | -- returns the table of a specific item | ||
| Line 65: | Line 66: | ||
--If the stat scales | --If the stat scales | ||
if (scaling_value ~= nil) then | if (scaling_value ~= nil) then | ||
scaling_value = utils_module.round_to_sig_fig(scaling_value, 3) | |||
--The hero has a scaling value with this stat | --The hero has a scaling value with this stat | ||
local template_title = "Template:" .. scaling_abbrevs[index] --scaling type's abbreviation | local template_title = "Template:" .. scaling_abbrevs[index] --scaling type's abbreviation | ||