-- This module is invoked by Template:Weapon.
-- To edit the weapons mapped by game, go to Module:Weapon/Map.
local weapon = {}
local getArgs = require('Module:Arguments').getArgs
local map = require('Module:Weapon/Map')
function getWeapon(weapon, game)
    if     game == '4'   then return map.fe4[weapon]
    elseif game == '5'   then return map.fe5[weapon] 
    elseif string.find('678', game) ~= nil then return map.gba[weapon]
    elseif game == '9'   then return map.fe9[weapon] 
    elseif game == '10'  then return map.fe10[weapon] 
    elseif game == '11' or game == '12' then return map.ds[weapon] 
    elseif game == '13'  then return map.fe13[weapon]
    elseif game == '14'  then return map.fe14[weapon]
    elseif game == '15'  then return map.fe15[weapon]
    elseif game == '0'   then return map.fe0[weapon]
    elseif game == 'feh' then return map.feh[weapon]
    elseif game == 'ts'  then return map.ts[weapon] 
    elseif game == 'ts2' then return map.ts2[weapon]
    elseif game == 'tms' then return map.tms[weapon]
function weapon.main(frame)
	local args = getArgs(frame)
	if(pcall(weapon._main, args)) then
        return weapon._main(args)
	    return '<span style="color:red">Invalid inputs. See [[Template:Weapon/doc]] for more info.</span>'
function weapon._main(args)
    local game = string.lower(args[1]) -- game input
    local wtype = string.lower(args[2]) -- weapon type input
    local result
    if game == '1' or game =='2' or game == '3' then
        result = '<span style="color:orange">This game doesn\'t have a weapon icon.</span>'
        result = getWeapon(wtype, game)
    if result == nil then
        return '<span style="color:red">Invalid inputs. See [[Template:Weapon/doc]] for more info.</span>'
        return result
return weapon

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.