<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alioth.net/index.php?action=history&amp;feed=atom&amp;title=Oolite_JavaScript_Reference%3A_Station_%28AI_Readable_Version%29</id>
	<title>Oolite JavaScript Reference: Station (AI Readable Version) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alioth.net/index.php?action=history&amp;feed=atom&amp;title=Oolite_JavaScript_Reference%3A_Station_%28AI_Readable_Version%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_Station_(AI_Readable_Version)&amp;action=history"/>
	<updated>2026-05-30T08:35:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_Station_(AI_Readable_Version)&amp;diff=86766&amp;oldid=prev</id>
		<title>Wildeblood: Formatted with markdown, not wiki markup; please do not &quot;fix&quot;. Do not add extraneous commentary. Do not add outward links.</title>
		<link rel="alternate" type="text/html" href="https://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_Station_(AI_Readable_Version)&amp;diff=86766&amp;oldid=prev"/>
		<updated>2025-07-27T07:13:21Z</updated>

		<summary type="html">&lt;p&gt;Formatted with markdown, not wiki markup; please do not &amp;quot;fix&amp;quot;. Do not add extraneous commentary. Do not add outward links.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
### `Station` (Ship)&lt;br /&gt;
&lt;br /&gt;
* **Description**: A `Station` is a type of `Ship` that has a docking port, such as a space station or a carrier. It inherits all properties and methods from the `Ship` class and adds several of its own.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
### **Properties**&lt;br /&gt;
&lt;br /&gt;
* **.alertCondition** (Number, Read/Write): The station's current alert condition: 1 = Green, 2 = Yellow, 3 = Red.&lt;br /&gt;
* **.allegiance** (String, Read/Write): A hint to AIs about the station's affiliation (e.g., `&amp;quot;galcop&amp;quot;`, `&amp;quot;pirate&amp;quot;`, `&amp;quot;private&amp;quot;`). This determines which ships are allowed to dock or are treated with hostility.&lt;br /&gt;
* **.allowsAutoDocking** (Boolean, Read/Write): If `true`, a player with a Docking Computer can use the autopilot to dock.&lt;br /&gt;
* **.allowsFastDocking** (Boolean, Read/Write): If `true`, a player with a Docking Computer can use the fast-dock key (Shift-C) to dock instantly.&lt;br /&gt;
* **.breakPattern** (Boolean, Read/Write): If `true` (the default), the visual break pattern is shown when ships launch or dock.&lt;br /&gt;
* **.dockedContractors** (Number, Read-only): The number of docked contractor ships available to launch as miners or scavengers.&lt;br /&gt;
* **.dockedDefenders** (Number, Read-only): The number of docked ships available to launch as defenders.&lt;br /&gt;
* **.dockedPolice** (Number, Read-only): The number of docked ships available to launch as police or patrol vessels.&lt;br /&gt;
* **.equipmentPriceFactor** (Number, Read-only): The price multiplier for equipment sold at this station, defined in `shipdata.plist`.&lt;br /&gt;
* **.equivalentTechLevel** (Number, Read-only): The station's effective tech level, defined in `shipdata.plist`.&lt;br /&gt;
* **.hasNPCTraffic** (Boolean, Read/Write): If `true`, the station will spawn associated NPC traffic like shuttles and patrol ships.&lt;br /&gt;
* **.hasShipyard** (Boolean, Read-only): If `true`, the station has a shipyard where the player can buy and sell ships.&lt;br /&gt;
* **.isMainStation** (Boolean, Read-only): `true` if this is the primary station in the system.&lt;br /&gt;
* **.market** (Object, Read-only): An object containing the current price and quantity data for all commodities at this station. The format of the data changed significantly in Oolite v1.81.&lt;br /&gt;
* **.requiresDockingClearance** (Boolean, Read/Write): `true` if ships must request docking clearance before docking.&lt;br /&gt;
* **.roll** (Number, Read/Write): The station's rate of roll in radians per second, adjustable between -2.0 and +2.0.&lt;br /&gt;
* **.shipyard** (Array, Read-only): An array of ship dictionary objects for all ships currently for sale. Returns `null` if there is no shipyard. Each object contains details like `shipdata_key`, `price`, and `extras`.&lt;br /&gt;
* **.suppressArrivalReports** (Boolean, Read/Write): If `true`, the arrival report screen is not shown when the player docks.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
### **Methods**&lt;br /&gt;
&lt;br /&gt;
* **abortAllDockings()**&lt;br /&gt;
    * **Description**: Revokes docking clearance for all ships currently in the docking queue. Their AIs will receive a message.&lt;br /&gt;
    * **Signature**: `()`&lt;br /&gt;
&lt;br /&gt;
* **abortDockingForShip(ship)**&lt;br /&gt;
    * **Description**: Revokes docking clearance for a specific ship.&lt;br /&gt;
    * **Signature**: `(ship: Ship)`&lt;br /&gt;
&lt;br /&gt;
* **addShipToShipyard(dictionary)**&lt;br /&gt;
    * **Description**: Adds a new ship to the station's shipyard for sale. The provided dictionary must include `shipdata_key` and `price`, and can include `extras` and `personality`.&lt;br /&gt;
    * **Signature**: `(dictionary: Object)`&lt;br /&gt;
&lt;br /&gt;
* **canDockShip(shipEntity)**&lt;br /&gt;
    * **Description**: Returns `true` if the provided ship is small enough to fit in the station's dock.&lt;br /&gt;
    * **Signature**: `(shipEntity: Ship): Boolean`&lt;br /&gt;
&lt;br /&gt;
* **dockPlayer()**&lt;br /&gt;
    * **Description**: Immediately docks the player's ship at the station. Returns `true` on success, `false` on failure.&lt;br /&gt;
    * **Signature**: `(): Boolean`&lt;br /&gt;
&lt;br /&gt;
* **launchDefenseShip()**&lt;br /&gt;
    * **Description**: Launches a defense ship. Aborts all current dockings for an immediate launch. Returns the entity of the chosen ship.&lt;br /&gt;
    * **Signature**: `(): Ship`&lt;br /&gt;
&lt;br /&gt;
* **launchEscort()**&lt;br /&gt;
    * **Description**: Launches a ship with the &amp;quot;escort&amp;quot; role. Returns the ship.&lt;br /&gt;
    * **Signature**: `(): Ship`&lt;br /&gt;
&lt;br /&gt;
* **launchMiner()**&lt;br /&gt;
    * **Description**: Launches a ship with the &amp;quot;miner&amp;quot; role. Only one miner from a station can be active at a time. Returns the entity of the chosen ship.&lt;br /&gt;
    * **Signature**: `(): Ship`&lt;br /&gt;
&lt;br /&gt;
* **launchPatrol()**&lt;br /&gt;
    * **Description**: Launches a police ship with a planetary patrol AI. Returns the entity of the chosen ship.&lt;br /&gt;
    * **Signature**: `(): Ship`&lt;br /&gt;
&lt;br /&gt;
* **launchPirateShip()**&lt;br /&gt;
    * **Description**: Launches a pirate ship, which is counted as a defense ship. Returns the entity of the chosen ship.&lt;br /&gt;
    * **Signature**: `(): Ship`&lt;br /&gt;
&lt;br /&gt;
* **launchPolice()**&lt;br /&gt;
    * **Description**: Launches up to four police ships. Aborts all current dockings for an immediate launch. Returns an array of chosen police ships.&lt;br /&gt;
    * **Signature**: `(): Array`&lt;br /&gt;
&lt;br /&gt;
* **launchScavenger()**&lt;br /&gt;
    * **Description**: Launches a ship with the &amp;quot;scavenger&amp;quot; role. Returns the entity of the chosen ship.&lt;br /&gt;
    * **Signature**: `(): Ship`&lt;br /&gt;
&lt;br /&gt;
* **launchShipWithRole(role, abortAllDockings)**&lt;br /&gt;
    * **Description**: Launches a ship with a given `role`. If the optional second parameter is `true`, it will abort all current dockings for an immediate launch. Returns the entity of the chosen ship.&lt;br /&gt;
    * **Signature**: `(role: String, abortAllDockings?: Boolean): Ship`&lt;br /&gt;
&lt;br /&gt;
* **launchShuttle()**&lt;br /&gt;
    * **Description**: Launches a ship with the &amp;quot;shuttle&amp;quot; role. Returns the entity of the chosen ship.&lt;br /&gt;
    * **Signature**: `(): Ship`&lt;br /&gt;
&lt;br /&gt;
* **removeShipFromShipyard(shipIndex)**&lt;br /&gt;
    * **Description**: Removes a ship from the shipyard sale list using its zero-based array index.&lt;br /&gt;
    * **Signature**: `(shipIndex: Number)`&lt;br /&gt;
&lt;br /&gt;
* **setInterface(key, interfaceDefinition)**&lt;br /&gt;
    * **Description**: Adds, modifies, or removes a custom screen in the station's F4 interface. The `interfaceDefinition` object requires properties like `title`, `category`, and a `callback` function.&lt;br /&gt;
    * **Signature**: `(key: String, interfaceDefinition: Object)`&lt;br /&gt;
&lt;br /&gt;
* **setMarketPrice(commodity, price)**&lt;br /&gt;
    * **Description**: Sets the price for a specific commodity in the station's market. The price is in decicredits (tenths of a credit).&lt;br /&gt;
    * **Signature**: `(commodity: String, price: Number)`&lt;br /&gt;
&lt;br /&gt;
* **setMarketQuantity(commodity, quantity)**&lt;br /&gt;
    * **Description**: Sets the available quantity for a specific commodity in the station's market. The quantity must be between 0 and 127 units.&lt;br /&gt;
    * **Signature**: `(commodity: String, quantity: Number)`&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wildeblood</name></author>
		
	</entry>
</feed>