Documentation for this module may be created at Module:Weapon/doc
local weapons_table = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate{title='Template:Weapons.json'})
local p = {}
p.getWeapon = function(frame)
local weapon = frame.args[1]
for i=1, #weapons_table, 1 do
if weapons_table[i]['name'] == weapon then
path = weapons_table[i]['path']
weapon_type = weapons_table[i]['type']
name = weapons_table[i]['name']
quality = weapons_table[i]['quality']
damage = weapons_table[i]['damage']
speed = weapons_table[i]['speed']
critchance = weapons_table[i]['critchance']
local txt = weapons_table[i]['name']
end
end
return txt
end
return p