- 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:EquipmentData"
Jump to navigation
Jump to search
com>Ckwng (Equipment rarities are so messed up...) |
com>Ckwng (Refactor out formatting) |
||
Line 2: | Line 2: | ||
local EquipmentData = BaseData() | local EquipmentData = BaseData() | ||
− | function EquipmentData:name( | + | function EquipmentData:name() |
− | return | + | return self._name |
end | end | ||
− | function EquipmentData:link( | + | function EquipmentData:link() |
if self._page then | if self._page then | ||
− | return | + | return self._page, self:name() |
else | else | ||
− | return | + | return self:name() |
end | end | ||
end | end | ||
− | function EquipmentData:id( | + | function EquipmentData:id() |
− | return | + | return self._id |
end | end | ||
− | function EquipmentData:japanese_name( | + | function EquipmentData:japanese_name() |
− | return | + | return self._japanese_name |
end | end | ||
− | function EquipmentData:type( | + | function EquipmentData:type() |
− | return | + | return self._type |
end | end | ||
− | function EquipmentData:rarity( | + | function EquipmentData:rarity() |
− | return | + | return self._rarity |
end | end | ||
function EquipmentData:stars() | function EquipmentData:stars() | ||
− | return self._stars or self:rarity( | + | return self._stars or self:rarity() |
end | end | ||
Line 38: | Line 38: | ||
end | end | ||
− | function EquipmentData:card( | + | function EquipmentData:card() |
− | return | + | return self._card |
end | end | ||
− | function EquipmentData:icon( | + | function EquipmentData:icon() |
− | return | + | return self._icon |
end | end | ||
− | function EquipmentData:firepower( | + | function EquipmentData:firepower() |
− | return | + | return self._firepower |
end | end | ||
− | function EquipmentData:bombing( | + | function EquipmentData:bombing() |
− | return | + | return self._bombing |
end | end | ||
− | function EquipmentData:torpedo( | + | function EquipmentData:torpedo() |
− | return | + | return self._torpedo |
end | end | ||
− | function EquipmentData:aa( | + | function EquipmentData:aa() |
− | return | + | return self._aa |
end | end | ||
− | function EquipmentData:armor( | + | function EquipmentData:armor() |
− | return | + | return self._armor |
end | end | ||
− | function EquipmentData:asw( | + | function EquipmentData:asw() |
− | return | + | return self._asw |
end | end | ||
− | function EquipmentData:shelling_accuracy( | + | function EquipmentData:shelling_accuracy() |
− | return | + | return self._shelling_accuracy |
end | end | ||
− | function EquipmentData:torpedo_accuracy( | + | function EquipmentData:torpedo_accuracy() |
− | return | + | return self._torpedo_accuracy |
end | end | ||
− | function EquipmentData:los( | + | function EquipmentData:los() |
− | return | + | return self._los |
end | end | ||
− | function EquipmentData:speed( | + | function EquipmentData:speed() |
− | return | + | return self._speed |
end | end | ||
− | function EquipmentData:luck( | + | function EquipmentData:luck() |
− | return | + | return self._luck |
end | end | ||
− | function EquipmentData:range( | + | function EquipmentData:range() |
− | return | + | return self._range |
end | end | ||
− | function EquipmentData:scrap_fuel( | + | function EquipmentData:scrap_fuel() |
− | return | + | return self._scrap_fuel |
end | end | ||
− | function EquipmentData:scrap_ammo( | + | function EquipmentData:scrap_ammo() |
− | return | + | return self._scrap_ammo |
end | end | ||
− | function EquipmentData:scrap_steel( | + | function EquipmentData:scrap_steel() |
− | return | + | return self._scrap_steel |
end | end | ||
− | function EquipmentData:scrap_bauxite( | + | function EquipmentData:scrap_bauxite() |
− | return | + | return self._scrap_bauxite |
end | end | ||
− | function EquipmentData:upgradable( | + | function EquipmentData:upgradable() |
return not not self._upgradable | return not not self._upgradable | ||
end | end | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
function EquipmentData:create(equip) | function EquipmentData:create(equip) |
Revision as of 22:46, 12 February 2015
Documentation for this module may be created at Module:EquipmentData/doc
local BaseData = require("Module:BaseData")
local EquipmentData = BaseData()
function EquipmentData:name()
return self._name
end
function EquipmentData:link()
if self._page then
return self._page, self:name()
else
return self:name()
end
end
function EquipmentData:id()
return self._id
end
function EquipmentData:japanese_name()
return self._japanese_name
end
function EquipmentData:type()
return self._type
end
function EquipmentData:rarity()
return self._rarity
end
function EquipmentData:stars()
return self._stars or self:rarity()
end
function EquipmentData:back()
return self._back or self:stars()
end
function EquipmentData:card()
return self._card
end
function EquipmentData:icon()
return self._icon
end
function EquipmentData:firepower()
return self._firepower
end
function EquipmentData:bombing()
return self._bombing
end
function EquipmentData:torpedo()
return self._torpedo
end
function EquipmentData:aa()
return self._aa
end
function EquipmentData:armor()
return self._armor
end
function EquipmentData:asw()
return self._asw
end
function EquipmentData:shelling_accuracy()
return self._shelling_accuracy
end
function EquipmentData:torpedo_accuracy()
return self._torpedo_accuracy
end
function EquipmentData:los()
return self._los
end
function EquipmentData:speed()
return self._speed
end
function EquipmentData:luck()
return self._luck
end
function EquipmentData:range()
return self._range
end
function EquipmentData:scrap_fuel()
return self._scrap_fuel
end
function EquipmentData:scrap_ammo()
return self._scrap_ammo
end
function EquipmentData:scrap_steel()
return self._scrap_steel
end
function EquipmentData:scrap_bauxite()
return self._scrap_bauxite
end
function EquipmentData:upgradable()
return not not self._upgradable
end
function EquipmentData:create(equip)
equip = equip or {}
setmetatable(equip, equip)
equip.__index = self
return equip
end
EquipmentData.__call = EquipmentData.create
return EquipmentData