Ship
This class describes a ship, which can move and also house aircraft.
ATTRIBUTES
id
: (str) unique identifier for the ship.Example:
"7bc96d3b-ffe7-4469-b976-893e7fa5deca"
name
: (str) name/callsign of the ship.Example:
"Carrier #4201"
sideName
: (str) side to which the ship belongs (e.g., BLUE, RED).Example:
"BLUE"
sideColor
: (str) the color of the ship's current side.selected
: (bool) whether the unit is currently selected.className
: (str) type of the ship.Example:
"Carrier"
latitude
: (float) latitude position.Example:
20.442558487173827
longitude
: (float) longitude position.Example:
144.16072045098306
altitude
: (float) altitude in feet.Example:
10000
heading
: (float) heading in degrees.Example:
85.42632327325884
speed
: (float) speed in knots.Example:
350
currentFuel
: (float) remaining fuel.Example:
100000
maxFuel
: (float) maximum fuel capacity.Example:
100000
fuelRate
: (float) the fuel consumption in lbs/hr.range
: (float) the maximum range of the ship's weapons.route
: (list[list[float]]) the ship's current route (collection of waypoints).weapons
: (list[Weapon]) list of weapons the ship has.aircraft
: (list[Aircraft]) list of aircraft housed at the ship.
METHODS
getTotalWeaponQuantity()
: (int) returns the ship's current count of weapons.getWeaponWithHighestRange()
: (int) returns the ship's highest range weapon.toJSON()
: (str) returns this object as a JSON.
Last updated