| Line 1: |
Line 1: |
| | local EquipmentCardKai = false | | local EquipmentCardKai = false |
| | + | local EquipmentCategoriesKai = false |
| | + | local EquipmentGraphicKai = false |
| | local EquipmentInfoKai = false | | local EquipmentInfoKai = false |
| | + | local EnemyEquipmentInfoKai = false |
| | local getArgs = require('Module:GetArgs') | | local getArgs = require('Module:GetArgs') |
| | | | |
| Line 6: |
Line 9: |
| | | | |
| | function EquipmentInfo.Infobox(frame) | | function EquipmentInfo.Infobox(frame) |
| | + | EquipmentInfoKai = EquipmentInfoKai or require('Module:EquipmentInfoKai') |
| | + | return EquipmentInfoKai:Infobox(frame.args.pagename and {frame.args.pagename} or getArgs{frame = frame:getParent()}) |
| | + | end |
| | + | |
| | + | function EquipmentInfo.Card(frame) |
| | + | local args = getArgs{frame = frame:getParent()} |
| | + | _prepareEquipmentCardKai() |
| | + | return EquipmentCardKai:Asset(args) |
| | + | end |
| | + | |
| | + | function _prepareEquipmentCardKai() |
| | + | if not EquipmentCardKai then |
| | + | EquipmentCardKai = require('Module:EquipmentCardKai') |
| | + | end |
| | + | end |
| | + | |
| | + | function EquipmentInfo.Graphic(frame) |
| | local args = getArgs{frame = frame:getParent()} | | local args = getArgs{frame = frame:getParent()} |
| − | _prepareEquipmentInfoKai() | + | _prepareEquipmentGraphicKai() |
| − | return EquipmentInfoKai:Infobox(args["name"]) | + | return EquipmentGraphicKai:Asset(args) |
| | + | end |
| | + | |
| | + | function _prepareEquipmentGraphicKai() |
| | + | if not EquipmentGraphicKai then |
| | + | EquipmentGraphicKai = require('Module:EquipmentGraphicKai') |
| | + | end |
| | end | | end |
| | | | |
| − | function EquipmentInfo._Infobox(frame) | + | function EquipmentInfo.Categories(frame) |
| − | local args = getArgs{frame = frame} | + | local args = getArgs{frame = frame:getParent()} |
| − | _prepareEquipmentInfoKai() | + | _prepareEquipmentCategoriesKai() |
| − | return EquipmentInfoKai:Infobox(args["name"]) | + | return EquipmentCategoriesKai:Categories(args) |
| | end | | end |
| | | | |
| − | function _prepareEquipmentInfoKai() | + | function _prepareEquipmentCategoriesKai() |
| − | if not EquipmentInfoKai then | + | if not EquipmentCategoriesKai then |
| − | EquipmentInfoKai = require('Module:EquipmentInfoKai') | + | EquipmentCategoriesKai = require('Module:EquipmentCategoriesKai') |
| | end | | end |
| | end | | end |
| | | | |
| − | function EquipmentInfo.Card(frame) | + | function EquipmentInfo.EnemyInfobox(frame) |
| | local args = getArgs{frame = frame:getParent()} | | local args = getArgs{frame = frame:getParent()} |
| − | _prepareEquipmentCardKai() | + | _prepareEnemyEquipmentInfoKai() |
| − | return EquipmentCardKai:Card(args) | + | return EnemyEquipmentInfoKai:Infobox(args) |
| | end | | end |
| | | | |
| − | function _prepareEquipmentCardKai() | + | function _prepareEnemyEquipmentInfoKai() |
| − | if not EquipmentCardKai then | + | if not EnemyEquipmentInfoKai then |
| − | EquipmentCardKai = require('Module:EquipmentCardKai') | + | EnemyEquipmentInfoKai = require('Module:EnemyEquipmentInfoKai') |
| | end | | end |
| | end | | end |
| | | | |
| | return EquipmentInfo | | return EquipmentInfo |