Dota 2 Wiki
m (Actually returning might be a good idea)
m (Not needed)
Line 7: Line 7:
 
no_input = 'Input missing',
 
no_input = 'Input missing',
 
},
 
},
number_format = 'en',
 
 
}
 
}
   
Line 13: Line 12:
 
function p.main()
 
function p.main()
 
local args = get_args()
 
local args = get_args()
local output = p._main(args)
+
return p._main(args)
 
if i18n.number_format ~= 'en' then
 
local lang = mw.getLanguage(i18n.number_format)
 
output = lang:formatNum(output, {true})
 
end
 
 
return output
 
 
end
 
end
   

Revision as of 12:50, 13 April 2018

Documentation for Module:Attribute bonuses Jump to code ↴ [ edit | purge ]

Reality Rift icon
▶️ Planeshift.
The documentation for this module can be found at Template:Attribute bonuses.
You may be forwarded to another wiki language, in case a translation is not available.

The actual data is stored in Module:Attribute bonuses/data.


Dependencies

local p = {}
local get_args = require('Module:Arguments').main
local data = mw.loadData('Module:Attribute bonuses/data')

local i18n = {
  error = {
    no_input = 'Input missing',
  },
}


function p.main()
  local args = get_args()
  return p._main(args)
end

function p._main(args)
  assert(args[1], i18n.error.no_input)
  
  local bonus_name = mw.ustring.lower(args[1])
  return data[bonus_name]
end


return p