• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Difference between revisions of "Module:ShipInfo"

From Kancolle Wiki
Jump to navigation Jump to search
com>Ckwng
com>Ckwng
Line 1: Line 1:
 
local ShipInfo = {}
 
local ShipInfo = {}
local ShipInfoKai = require('Module:ShipInfoKai')
+
 
 +
local ShipCardKai = false
 +
local ShipInfoKai = false
 
local getArgs = require('Module:GetArgs')
 
local getArgs = require('Module:GetArgs')
  
 
function ShipInfo.Infobox(frame)
 
function ShipInfo.Infobox(frame)
 
local args = getArgs{frame = frame:getParent()}
 
local args = getArgs{frame = frame:getParent()}
 +
_prepareShipInfoKai()
 
return ShipInfoKai:Infobox(args)
 
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 ShipInfo.BattleCard(frame)
 +
local args = getArgs{frame = frame:getParent()}
 +
_prepareShipCardKai()
 +
return ShipCardKai:BattleCard(args)
 +
end
 +
 +
function _prepareShipCardKai()
 +
if not ShipCardKai then
 +
ShipCardKai = require('Module:ShipCardKai')
 +
end
 
end
 
end
  
 
return ShipInfo
 
return ShipInfo

Revision as of 17:17, 6 April 2015

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

local ShipInfo = {}

local ShipCardKai = 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 ShipInfo.BattleCard(frame)
	local args = getArgs{frame = frame:getParent()}
	_prepareShipCardKai()
	return ShipCardKai:BattleCard(args)
end

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

return ShipInfo