Changes

ShipData:is_XXX added
Line 168: Line 168:  
function ShipData:is_battleship()
 
function ShipData:is_battleship()
 
return self._type == 8 or self._type == 9 or self._type == 10 or self._type == 12
 
return self._type == 8 or self._type == 9 or self._type == 10 or self._type == 12
 +
end
 +
 +
function ShipData:is_carrier()
 +
return self._type == 7 or self._type == 11 or self._type == 18
 +
end
 +
 +
function ShipData:is_auxiliary()
 +
return self._type == 22 or self._type == 16 or self._type == 17 or self._type == 19 or self._type == 20
 +
end
 +
 +
function ShipData:is_submarine()
 +
return self._type == 13 or self._type == 14
 +
end
 +
 +
function ShipData:is_CL()
 +
return self._type == 3 or self._type == 4 or self._type == 21
 
end
 
end
  
35,041

edits