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

Changes

Jump to navigation Jump to search
no edit summary
Line 249: Line 249:  
if self._cg then
 
if self._cg then
 
return self._cg
 
return self._cg
elseif self._cg_reference then
+
end
 +
local id = self:api_id()
 +
if id and id > 1500 then
 +
local new_id = require('Module:Data/EnemyEquipmentCG')[id]
 +
local reference
 +
if new_id and new_id > 1500 then
 +
local EnemyEquipment = require('Module:Collection/EnemyEquipment')
 +
reference = U.find(EnemyEquipment, new_id - 1000, '_id')
 +
end
 +
if new_id and new_id <= 1500 then
 +
local ShipEquipment = require('Module:Data/Equipment')
 +
reference = U.find(ShipEquipment, new_id, '_id')
 +
end
 +
if reference then
 +
return Equipment(reference._name):cg()
 +
end
 +
end
 +
--[[
 +
if self._cg_reference then
 
Equipment = Equipment or require(self._constructor_module)
 
Equipment = Equipment or require(self._constructor_module)
 
return Equipment(self._cg_reference):cg()
 
return Equipment(self._cg_reference):cg()
 
end
 
end
local api_id = self:api_id()
+
]]--
if api_id then
+
if id then
return Formatting:equipment_cg(api_id, self:asset_name())
+
return Formatting:equipment_cg(id, self:asset_name())
 
end
 
end
 
return self._cg
 
return self._cg
cssedit, gkautomate
7,064

edits

Navigation menu