• 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 5: Line 5:     
local BaseData = require("Module:BaseData")
 
local BaseData = require("Module:BaseData")
local ShipData = BaseData()
+
local ShipData = BaseData{
 +
_constructor_module = "Module:Ship",
 +
}
    
function ShipData:name(raw)
 
function ShipData:name(raw)
Line 100: Line 102:  
return self._card
 
return self._card
 
elseif self._card_reference then
 
elseif self._card_reference then
Ship = Ship or require('Module:Ship')
+
Ship = Ship or require(self._constructor_module)
 
return Ship:create_from_reference(self._card_reference, self):card()
 
return Ship:create_from_reference(self._card_reference, self):card()
 
end
 
end
Line 114: Line 116:  
return self._card_damaged
 
return self._card_damaged
 
elseif self._card_damaged_reference then
 
elseif self._card_damaged_reference then
Ship = Ship or require('Module:Ship')
+
Ship = Ship or require(self._constructor_module)
 
return Ship:create_from_reference(self._card_damaged_reference, self):card_damaged()
 
return Ship:create_from_reference(self._card_damaged_reference, self):card_damaged()
 
end
 
end
Line 128: Line 130:  
return self._battle_card
 
return self._battle_card
 
elseif self._battle_card_reference then
 
elseif self._battle_card_reference then
Ship = Ship or require('Module:Ship')
+
Ship = Ship or require(self._constructor_module)
 
return Ship:create_from_reference(self._battle_card_reference, self):battle_card()
 
return Ship:create_from_reference(self._battle_card_reference, self):battle_card()
 
end
 
end
Line 146: Line 148:  
return self._battle_card_damaged
 
return self._battle_card_damaged
 
elseif self._battle_card_damaged_reference then
 
elseif self._battle_card_damaged_reference then
Ship = Ship or require('Module:Ship')
+
Ship = Ship or require(self._constructor_module)
 
return Ship:create_from_reference(self._battle_card_damaged_reference, self):battle_card_damaged()
 
return Ship:create_from_reference(self._battle_card_damaged_reference, self):battle_card_damaged()
 
end
 
end
Line 160: Line 162:  
return self._cg
 
return self._cg
 
elseif self._cg_reference then
 
elseif self._cg_reference then
Ship = Ship or require('Module:Ship')
+
Ship = Ship or require(self._constructor_module)
 
return Ship:create_from_reference(self._cg_reference, self):cg()
 
return Ship:create_from_reference(self._cg_reference, self):cg()
 
end
 
end
Line 174: Line 176:  
return self._cg_damaged
 
return self._cg_damaged
 
elseif self._cg_damaged_reference then
 
elseif self._cg_damaged_reference then
Ship = Ship or require('Module:Ship')
+
Ship = Ship or require(self._constructor_module)
 
return Ship:create_from_reference(self._cg_damaged_reference, self):cg_damaged()
 
return Ship:create_from_reference(self._cg_damaged_reference, self):cg_damaged()
 
end
 
end
Anonymous user

Navigation menu