Oolite JavaScript Reference: ShipGroup

From Elite Wiki
Revision as of 12:32, 28 August 2009 by Eric Walch (talk | contribs) (Added shipGroups entry)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This class was added in Oolite test release 1.73.

The ShipGroup class is a property of an Entity representing a group of ships.

Properties

ships

ships : Array of entites (read-only)

leader

leader : Entity (read/write)

name

name : String (read/write)

Name of the shipgroup.

count

count : Integer (read-only)

Number of ships in the group, including leader.


Methods

toString

function toString()

Returns the whole group as a human readable string.

addShip

function addShip([ship : Entity])

Adds an entity to a group.

removeShip

function removeShip([ship : Entity])

Removes an entity to a group.

containsShip

function containsShip([ship : Entity])

Boolean, returns true when the ship belongs to the group. When not it returns false.