Changes

no edit summary
Line 1: Line 1:  
local Equipment = require('Module:Equipment')
 
local Equipment = require('Module:Equipment')
 
local Formatting = require('Module:Formatting')
 
local Formatting = require('Module:Formatting')
--local Ship = require('Module:Ship')
+
local Ship
 
local ShipClass = require('Module:ShipClass')
 
local ShipClass = require('Module:ShipClass')
   Line 97: Line 97:  
return self._card
 
return self._card
 
elseif self._card_reference then
 
elseif self._card_reference then
 +
Ship = Ship or require('Module:Ship')
 
return Ship:create_from_reference(self._card_reference, self):card()
 
return Ship:create_from_reference(self._card_reference, self):card()
 
end
 
end
Line 110: Line 111:  
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')
 
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 122: Line 124:  
if self._battle_card then
 
if self._battle_card then
 
return self._battle_card
 
return self._battle_card
-- elseif self._battle_card_reference then
+
elseif self._battle_card_reference then
-- return Ship:create_from_reference(self._battle_card_reference, self):battle_card()
+
Ship = Ship or require('Module:Ship')
 +
return Ship:create_from_reference(self._battle_card_reference, self):battle_card()
 
end
 
end
 
api_id = self:api_id()
 
api_id = self:api_id()
Line 136: Line 139:  
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')
 
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 149: Line 153:  
return self._cg
 
return self._cg
 
elseif self._cg_reference then
 
elseif self._cg_reference then
 +
Ship = Ship or require('Module:Ship')
 
return Ship:create_from_reference(self._cg_reference, self):cg()
 
return Ship:create_from_reference(self._cg_reference, self):cg()
 
end
 
end
Line 162: Line 167:  
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')
 
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