Module:ShipInfo

Revision as of 22:22, 23 September 2015 by com>Ckwng (Undo revision 466953 by Ckwng (talk))

Documentation for this module may be created at Module:ShipInfo/doc

local ShipInfo = {}

local EnemyShipInfoKai = false
local ShipBattleCardKai = false
local ShipCardKai = false
local ShipCategoriesKai = false
local ShipGraphicKai = false
local ShipInfoKai = false
local getArgs = require('Module:GetArgs')

function ShipInfo.Infobox(frame)
	local args = getArgs{frame = frame:getParent()}
	_prepareShipInfoKai()
	return ShipInfoKai:Infobox(args)
end

function _prepareShipInfoKai()
	if not ShipInfoKai then
		ShipInfoKai = require('Module:ShipInfoKai')
	end
end

function ShipInfo.Card(frame)
	local args = getArgs{frame = frame:getParent()}
	_prepareShipCardKai()
	return ShipCardKai:Card(args)
end

function _prepareShipCardKai()
	if not ShipCardKai then
		ShipCardKai = require('Module:ShipCardKai')
	end
end

function ShipInfo.BattleCard(frame)
	local args = getArgs{frame = frame:getParent()}
	_prepareShipBattleCardKai()
	return ShipBattleCardKai:Asset(args)
end

function _prepareShipBattleCardKai()
	if not ShipBattleCardKai then
		ShipBattleCardKai = require('Module:ShipBattleCardKai')
	end
end

function ShipInfo.Graphic(frame)
	local args = getArgs{frame = frame:getParent()}
	_prepareShipGraphicKai()
	return ShipGraphicKai:Graphic(args)
end

function _prepareShipGraphicKai()
	if not ShipGraphicKai then
		ShipGraphicKai = require('Module:ShipGraphicKai')
	end
end

function ShipInfo.EnemyInfobox(frame)
	local args = getArgs{frame = frame:getParent()}
	_prepareEnemyShipInfoKai()
	return EnemyShipInfoKai:Infobox(args)
end

function _prepareEnemyShipInfoKai()
	if not EnemyShipInfoKai then
		EnemyShipInfoKai = require('Module:EnemyShipInfoKai')
	end
end

function ShipInfo.Categories(frame)
	local args = getArgs{frame = frame:getParent()}
	_prepareShipCategoriesKai()
	return ShipCategoriesKai:Categories(args)
end

function _prepareShipCategoriesKai()
	if not ShipCategoriesKai then
		ShipCategoriesKai = require('Module:ShipCategoriesKai')
	end
end

return ShipInfo