- 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:EnemyShip"
Jump to navigation
Jump to search
(Created page with "local EnemyShip = {} local ships = {} local EnemyShipData = require('Module:EnemyShipData') function EnemyShip:get(stat, name, model) return self:create(name, model)[stat...") |
com>Ckwng (Make EnemyShip an extension of Ship) |
||
Line 1: | Line 1: | ||
− | local EnemyShip = {} | + | local EnemyShip = Ship:extend{ |
− | + | _ships = {}, --maintain a separate cache from Ship | |
+ | _data_class = false, | ||
+ | } | ||
− | + | function EnemyShip:_prepareShipData() | |
− | + | self._data_class = self._data_class or require('Module:EnemyShipData') | |
− | function EnemyShip: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
end | end | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
return EnemyShip | return EnemyShip |
Revision as of 01:25, 22 May 2015
Documentation for this module may be created at Module:EnemyShip/doc
local EnemyShip = Ship:extend{
_ships = {}, --maintain a separate cache from Ship
_data_class = false,
}
function EnemyShip:_prepareShipData()
self._data_class = self._data_class or require('Module:EnemyShipData')
end
return EnemyShip