Module:Battle

local f = require("Module:Functions") local maps = mw.loadData('Module:Battle/data')

local p = {}

function p.infobox(frame) local mapName = mw.title.getCurrentTitle.text local map = maps[mapName] if map == nil then return "Please insert data to Module:Battle/data" end local args = { image = mapName..".png", energy = map.energy, waves = map.waves, desc = map.description }	return frame:expandTemplate { title = 'Infobox map', args = args } end

return p