https://wiki.alioth.net/api.php?action=feedcontributions&user=Alaric&feedformat=atomElite Wiki - User contributions [en]2024-03-29T07:09:28ZUser contributionsMediaWiki 1.31.12https://wiki.alioth.net/index.php?title=User:Alaric/KV-16_Owners_Manual&diff=53906User:Alaric/KV-16 Owners Manual2016-11-15T08:50:27Z<p>Alaric: Created page with "This page contains the Work-In-Progress user manuals for: <div class="center" style="width: auto; margin-left: auto; margin-right: auto;">KV-16 Torus Field Monitor</div> <div..."</p>
<hr />
<div>This page contains the Work-In-Progress user manuals for:<br />
<br />
<div class="center" style="width: auto; margin-left: auto; margin-right: auto;">KV-16 Torus Field Monitor</div><br />
<div class="center" style="width: auto; margin-left: auto; margin-right: auto;">and</div><br />
<div class="center" style="width: auto; margin-left: auto; margin-right: auto;">KV-32 Torus Field Analyser</div><br />
<br />
== Disclaimer ==<br />
<br />
Raeddi Systems Ltd. accepts no responsibility for damage or loss of ship, equipment or life to yourself or others due to use of the Raeddi Torus Field Monitor in any capacity. Furthermore, Raeddi Systems does not advocate nor condone the use of the Raeddi Torus Field Monitor as a means of locating other vessels for any illegal activities. Anything which happens to anybody, anywhere, for any reason, is the sole responsibility of the commander.<br />
<br />
== Declaration of Legitimacy ==<br />
<br />
Raeddi Systems Ltd. is recognized by GalCop as a Mostly Legitimate Enterprise as defined by article XXIII, chapter MMXVI, subsection 32a of the GalCop code of conduct for businesses and other questionable ventures.<br />
<br />
== Introduction ==<br />
<br />
The Torus Drive has been the mainstay of intra-system travel since before the time of the legendary Jameson, and it's invention is remembered not only for unifying intra-system space, but also for introducing commanders the galaxy over to the frustration of mass-lock. The number of hours of valuable trading time which have been lost to this inescapable, if seemingly contrived phenomenon, can only be measured as fractions of the age of the Ooniverse.<br />
<br />
Raeddi Systems, therefore, is proud to introduce the first piece of technology since the invention of the Witchdrive Fuel Injector which provides commanders with a means to fight back. The Raeddi Torus Field Monitor (RTFM) is the only equipment available today which will provide you with advanced warning of mass-lock, and the only equipment officially endorsed by Cdr. Peter Jameson!*<br />
<br />
''The next time you engage your Torus Drive, make sure you're Raeddi!''<br />
<br />
* As advised by Cdr. Peter Jameson's lawyers, we wish to clarify that Cdr. Jameson does not in any way endorse this equipment, and wish apologise to anyone who mistook this stamement as an official endorement.<br />
<br />
== Kit Contents ==<br />
<br />
Before installing your KV-16 or KV-32, please ensure your package includes the following items. Note that Raeddi Systems Ltd. recommends installation by a licensed spacecraft mechanic only.<br />
* 1 x Raeddi KV-16 or KV-32 Torus Field Unit.<br />
* 1 x Quick-Start Guide.<br />
* 1 x Owners Manual.<br />
* 1 x Installation chip.<br />
* 1 x Multi-Universal Serial Bus cable with sub-micron adapter.<br />
<br />
== Basic usage (KV-16+) ==<br />
<br />
The RTFM requires no manual activation. It is synchronized to the operation of your Torus Drive and will provide all available functionality* without intervention.<br />
<br />
In its most basic mode of operation, the RTFM will alert your with an audible alarm and a message on your ship's console when it detects a disturbance in the Torus field. Using the precise metrics of the anomaly, the RTFM will determine the approximate time* to Torus field collapse (and hence, mass lock) if the present heading is maintained. This information will also be supplied to you via your console.<br />
If corrective action is taken and the field stability returns to nominal ranges you will be alerted of this fact, again by audible alert and a message on your console.<br />
<br />
* Raeddi Systems recommends you read the notes under "Limitations"<br />
<br />
== Tyley-Feynman GW-99 integration ==<br />
<br />
With the reluctant cooperation of Tyley-Feynman engineers, we are pleased to offer the following enhancements to users of the GW-99 Advanced Space Compass.<br />
Space Compass Heading (KV-16+):<br />
Upon detecting a Torus disturbance, your Advance Space Compass will indicate the general direction of the disturbance under the symbol "m<>".<br />
HUD indicator (KV-32 only):<br />
The computed location of the disturbance will also be displayed on your HUD in the form of a waypoint reticle.</div>Alarichttps://wiki.alioth.net/index.php?title=User:Alaric&diff=53905User:Alaric2016-11-15T08:36:17Z<p>Alaric: </p>
<hr />
<div>Hello!<br />
<br />
My name is actually Darren, but I chose to go by the name "alaric" after Alaric I - first king of the Visigoths. On the forum, I go by "alaric of rothestes"; Rothestes being Alaric's father.<br />
<br />
I currently fly an Iron-Ass Boa Class Cruiser named "Echo of Thunder".<br />
<br />
I am working on an OXP to warn of mass lock.<br />
<br />
WIP documentation [[User:Alaric/KV-16 Owners Manual|here]]</div>Alarichttps://wiki.alioth.net/index.php?title=User:Alaric&diff=53904User:Alaric2016-11-15T08:33:57Z<p>Alaric: Created page with "Hello! My name is actually Darren, but I chose to go by the name "alaric" after Alaric I - first king of the Visigoths. On the forum, I go by "alaric of rothestes"; Rothestes..."</p>
<hr />
<div>Hello!<br />
<br />
My name is actually Darren, but I chose to go by the name "alaric" after Alaric I - first king of the Visigoths. On the forum, I go by "alaric of rothestes"; Rothestes being Alaric's father.<br />
<br />
I currently fly an Iron-Ass Boa Class Cruiser named "Echo of Thunder".</div>Alarichttps://wiki.alioth.net/index.php?title=File:Torus-field-monitor-wip-3.oxz&diff=53903File:Torus-field-monitor-wip-3.oxz2016-11-13T05:49:22Z<p>Alaric: WIP 3 pre-release of Torus Field Monitor OXP</p>
<hr />
<div>WIP 3 pre-release of Torus Field Monitor OXP</div>Alarichttps://wiki.alioth.net/index.php?title=File:Torus-field-monitor.oxp-wip-2.oxz&diff=53897File:Torus-field-monitor.oxp-wip-2.oxz2016-11-08T08:37:06Z<p>Alaric: WIP 2 of Raeddi Systems KV-16/KV-32 Torus Field Monitor</p>
<hr />
<div>WIP 2 of Raeddi Systems KV-16/KV-32 Torus Field Monitor</div>Alarichttps://wiki.alioth.net/index.php?title=Oolite_JavaScript_Reference:_System&diff=53868Oolite JavaScript Reference: System2016-11-01T05:37:55Z<p>Alaric: /* addShips */ + note about creating ships via shipdatakey</p>
<hr />
<div><small>'''Prototype:''' <code>Object</code></small><br /><br />
<small>'''Subtypes:''' none</small><br />
<br />
The '''<code>System</code>''' class represents the current system. There is always one <code>System</code> object, available through the global property <code>system</code>.<br />
<br />
Attempts to change system properties are ignored in interstellar space (i.e., the place you end up in after a witchspace malfunction).<br />
<br />
== Properties ==<br />
=== <code>allShips</code> ===<br />
'''allShips''' : Array (read-only)<br />
A list of the ships in the system.<br />
<br />
'''See Also:''' <code>[[#entitiesWithScanClass|entitiesWithScanClass]]()</code>, <code>[[#filteredEntities|filteredEntities]]()</code>, <code>[[#shipsWithPrimaryRole|shipsWithPrimaryRole]]()</code>, <code>[[#shipsWithRole|shipsWithRole]]()</code><br />
<br />
=== <code>allVisualEffects</code> ===<br />
{{oolite-prop-added|1.77}}<br />
'''allVisualEffects''' : Array (read-only)<br />
A list of the [[Oolite_JavaScript_Reference:_VisualEffect|visual effects]] in the system.<br />
<br />
=== <code>breakPattern</code> ===<br />
{{oolite-prop-added|1.77}}<br />
'''breakPattern''' : Boolean (read/write)<br />
If <code>true</code> (the default state set on entry to a new system), the break pattern will be shown to the player as they exit witchspace. While this property may be set from places other than the <code>shipWillExitWitchspace</code> world script event, it is pointless to do so.<br />
<br />
Unlike all other system properties, this one may be changed on entry to interstellar space.<br />
<br />
=== <code>description</code> ===<br />
'''description''' : String (read/write)<br />
The description of the current system, as seen on the planet info screen.<br />
<br />
=== <code>economy</code> ===<br />
'''economy''' : Number (integer, read/write)<br />
The type of economy in the current system, ranging from 0 (Rich Industrial) to 7 (Poor Agricultural).<br />
<br />
'''See Also:''' <code>[[#economyDescription|economyDescription]]</code><br />
<br />
=== <code>economyDescription</code> ===<br />
'''economyDescription''' : String (read-only)<br />
A localized description of the economy type, for example, “Mostly Industrial”. Since this string is localized, it should only be used for display purposes.<br />
<br />
'''See Also:''' <code>[[#economy|economy]]</code><br />
<br />
=== <code>government</code> ===<br />
'''government''' : Number (read/write, integer)<br />
The type of government in the current system, ranging from 0 (Anarchy) to 7 (Corporate State).<br />
<br />
'''See Also:''' <code>[[#governmentDescription|governmentDescription]]</code><br />
<br />
=== <code>governmentDescription</code> ===<br />
'''governmentDescription''' : String (read-only)<br />
A localized description of the government type, for example, “Democracy”. Since this string is localized, it should only be used for display purposes.<br />
<br />
'''See Also:''' <code>[[#government|government]]</code><br />
<br />
=== <code>ID</code> ===<br />
ID : Number (integer, read-only)<br />
A number identifying the system. 0 to 255, or -1 for interstellar space.<br />
<br />
=== <code>info</code> ===<br />
'''info''' : [[Oolite JavaScript Reference: SystemInfo|SystemInfo]] (read/write)<br />
Allows access to system properties, using the same keys as [[planetinfo.plist]].<br />
<br />
'''Example:'''<br />
system.info.description = "This is a dull planet.";<br />
<br />
=== <code>inhabitantsDescription</code> ===<br />
'''inhabitantsDescription''' : String (read/write)<br />
The description of the inhabitants of the current system, such as “Slimy Blue Frogs”.<br />
<br />
=== <code>isInterstellarSpace</code> ===<br />
'''isInterstellarSpace''' : Boolean (read-only)<br />
<code>true</code> if the current system is in interstellar space, <code>false</code> otherwise.<br />
<br />
=== <code>mainPlanet</code> ===<br />
'''mainPlanet''' : {{oojsclass|Planet}} (read-only)<br />
The system’s main planet, or <code>null</code> if there is none.<br />
<br />
=== <code>mainStation</code> ===<br />
'''mainStation''' : [[Oolite JavaScript Reference: Station|Station]] (read-only)<br />
The system’s main station, or <code>null</code> if there is none.<br />
<br />
=== <code>name</code> ===<br />
'''name''' : String (read/write)<br />
The name of the system.<br />
<br />
=== <code>planets</code> ===<br />
'''planets''' : Array (read-only)<br />
A list of the planets in the system.<br />
<br />
=== <code>population</code> ===<br />
'''population''' : Number (integer, read/write)<br />
The population of the current system.<br />
<br />
=== <code>populatorSettings</code> ===<br />
{{oolite-prop-added|1.79}}<br />
'''populatorSettings''' : Dictionary (read-only)<br />
The current [[Oolite_System_Populator|populator settings]]. This is only useful to read during while system population is being prepared. After that point further changes are meaningless.<br />
<br />
'''See Also:''' <code>[[#setPopulator|setPopulator]]</code><br />
<br />
<br />
=== <code>productivity</code> ===<br />
'''productivity''' : Number (integer, read/write)<br />
The productivity of the current system.<br />
<br />
=== <code>pseudoRandom100</code> ===<br />
'''pseudoRandom100''' : Number (integer, read-only)<br />
A random number between 0 and 99 that is always the same for a given system. '''Important:''' this method has the undesirable side effect of resetting the system random number generator. It should only be used for backwards-compatibility. For new development, use <code>[[#scrambledPseudoRandomNumber|scrambledPseudoRandomNumber]]()</code> or <code>[[#pseudoRandomNumber|pseudoRandomNumber]]</code>.<br />
<br />
=== <code>pseudoRandom256</code> ===<br />
'''pseudoRandom256''' : Number (integer, read-only)<br />
A random number between 0 and 255 that is always the same for a given system. '''Important:''' this method has the undesirable side effect of resetting the system random number generator. It should only be used for backwards-compatibility. For new development, use <code>[[#scrambledPseudoRandomNumber|scrambledPseudoRandomNumber]]()</code> or <code>[[#pseudoRandomNumber|pseudoRandomNumber]]</code>.<br />
<br />
=== <code>pseudoRandomNumber</code> ===<br />
'''pseudoRandomNumber''' : Number (read-only)<br />
A random number between 0 and 1 that is always the same for a given system. In general, you should avoid using this number directly and call <code>[[#scrambledPseudoRandomNumber|scrambledPseudoRandomNumber]]()</code> instead.<br />
<br />
=== <code>stations</code> ===<br />
{{oolite-prop-added|1.79}}<br />
'''stations''' : Array (read-only)<br />
A list of the stations in the system.<br />
<br />
=== <code>sun</code> ===<br />
'''sun''' : [[Oolite JavaScript Reference: Sun|Sun]] (read-only)<br />
The system’s sun, or <code>null</code> if there is none.<br />
<br />
=== <code>techLevel</code> ===<br />
'''techLevel''' : Number (integer, read/write)<br />
The technology level of the current system, ranging from 0 to 15.<br />
<br />
=== <code>wormholes</code> ===<br />
{{oolite-prop-added|1.79}}<br />
'''wormholes''' : Array (read-only)<br />
A list of the wormholes in the system.<br />
<br />
=== <code>waypoints</code> ===<br />
{{oolite-prop-added|1.79}}<br />
'''waypoints''' : Array (read-only)<br />
A dictionary of the waypoints in the system by key and value.<br />
<br />
'''See Also:''' <code>[[#setWaypoint|setWaypoint()]]</code><br />
<br />
== Methods ==<br />
=== <code>addGroup</code> ===<br />
function '''addGroup'''(role : String, count : Number [, position: {{oojsvecexpr}}] [, radius: Number]) : {{oojsclass|ShipGroup}}<br />
Like <code>[[#addShips|addShips()]]</code>, but puts the ships in a group and returns the group.<br />
<br />
'''See Also:''' <code>[[#addGroupToRoute|addGroupToRoute()]]</code>, <code>[[#addShips|addShips()]]</code><br />
<br />
=== <code>addGroupToRoute</code> ===<br />
function '''addGroupToRoute'''(role : String, count : Number [, fraction: Number] [, route: String]) : {{oojsclass|ShipGroup}}<br />
Like <code>[[#addShipsToRoute|addShipsToRoute()]]</code>, but puts the ships in a group and returns the group.<br />
<br />
'''See Also:''' <code>[[#addGroup|addGroup()]]</code>, <code>[[#addShipsToRoute|addShipsToRoute()]]</code><br />
<br />
=== <code>addMoon</code> ===<br />
function '''addMoon'''(planetInfoKey : String) : {{oojsclass|Planet}}<br />
Adds a moon to the system, using the specified entry in ''[[planetinfo.plist]]''. A moon is the same as a planet, except that it has no atmosphere.<br />
<br />
'''See Also:''' <code>[[#addPlanet|addPlanet()]]</code><br />
<br />
=== <code>addPlanet</code> ===<br />
function '''addPlanet'''(planetInfoKey : String) : {{oojsclass|Planet}}<br />
Adds a planet to the system, using the specified entry in ''[[planetinfo.plist]]''.<br />
<br />
'''See Also:''' <code>[[#addMoon|addMoon()]]</code><br />
<br />
=== <code>addShips</code> ===<br />
function '''addShips'''(role : String, count : Number [, position: {{oojsvecexpr}}] [, radius: Number]) : Array<br />
Adds ships to the system and returns the added ships in an array. Position is in absolute coordinates. When no position is given, the witchpoint is assumed. When no radius is given, the maximum scanner range is used. Ships added in range of the witchpoint automatically create a witchpoint entry cloud.<br />
<br />
When you want to use coordinates from the legacy "pwp" system you can use the function [[Oolite_JavaScript_Reference:_Vector3D#fromCoordinateSystem|fromCoordinateSystem]] to convert legacy type coordinates to absolute coordinates.<br />
<br />
If you wish to add ships of a specific shipdata key, pass the key as the "role" parameter, enclosed in square brackets.<br />
<br />
'''See Also:''' <code>[[#addGroup|addGroup()]]</code>, <code>[[#addShipsToRoute|addShipsToRoute()]]</code><br />
<br />
=== <code>addShipsToRoute</code> ===<br />
function '''addShipsToRoute'''(role : String, count : Number [, fraction: Number] [, route: String]) : Array<br />
Adds ships to the system on certain common routes and returns the added ships as an array. The routes are the two character codes <code>wp</code>, <code>pw</code>, <code>ws</code>, <code>sw</code>, <code>sp</code>, and <code>ps</code>, where <code>w</code> stands for the witchpoint, <code>p</code> for the planet and <code>s</code> for the sun.<br />
<br />
When no route is defined, the route witchpoint → main station is assumed.<br />
<br />
The position is a fraction of the route and must be between 0 and 1. Unlike the legacy commands the fraction takes planetary radii in account, so it does not start counting in the centre of sun/planet but from its surface. When no fraction is defined, a random fraction is chosen. Ships are added within scanner range of this position. Ships added in range of the witchpoint automatically create a witchpoint entry cloud.<br />
<br />
'''Example''':<br />
var ships = system.addShipsToRoute("myShips", 2, 0.7, "sw")<br />
var pirates = system.addShipsToRoute("pirate", 3, Math.random(), "sp")<br />
The first line adds 2 ships near each-other on the route from sun to witchpoint and puts the added ship in the array <code>ships</code>, and the second line adds a group of 3 pirates at a random position along the sun to planet route and returns the array <code>pirates</code>.<br />
<br />
'''Note:''' this method will fail and return <code>null</code> if either of the route end points doesn’t exist. No valid routes exist in interstellar space.<br />
<br />
'''See Also:''' <code>[[#addGroupToRoute|addGroupToRoute()]]</code>, <code>[[#addShips|addShips()]]</code><br />
<br />
=== <code>addVisualEffect</code> ===<br />
{{oolite-method-added|1.77}}<br />
function '''addVisualEffect'''(effectKey : String, position: {{oojsvecexpr}}) : VisualEffect<br />
Adds a new visual effect with the effectKey in effectdata to the system, at the specified position, and returns the added effect. If the effectKey does not exist, or creation was otherwise impossible, this method will fail and return <code>null</code>.<br />
<br />
Note that unlike the functions for adding ships, <code>addVisualEffect</code> returns a single entity, not an array.<br />
<br />
=== <code>countEntitiesWithScanClass</code> ===<br />
function '''countEntitiesWithScanClass'''(scanClass : String [, relativeTo : {{oojsclass|Entity}} [, range : Number]]) : Number (integer)<br />
Returns the number of ships with the specified ScanClass in the system.<br />
<br />
=== <code>countShipsWithPrimaryRole</code> ===<br />
function '''countShipsWithPrimaryRole'''(role : String [, relativeTo : {{oojsclass|Entity}} [, range : Number]]) : Number (integer)<br />
Returns the number of ships with the specified primary role in the system.<br />
<br />
=== <code>countShipsWithRole</code> ===<br />
function '''countShipsWithRole'''(role : String [, relativeTo : {{oojsclass|Entity}} [, range : Number]]) : Number (integer)<br />
Returns the number of ships with the specified role in the system. Counts not only the primary role the ship is added with but all roles a ship can have.<br />
<br />
=== <code>entitiesWithScanClass</code> ===<br />
function '''entitiesWithScanClass'''(scanClass : String [, relativeTo : {{oojsclass|Entity}} [, range : Number]]) : Array<br />
A list of the entities in the system whose scan class is <code>scanClass</code>. If <code>relativeTo</code> is specified, the list will be sorted in order of proximity to <code>relativeTo</code> (i.e., the first element of the list is closest). If <code>range</code> is also specified, entities further than <code>range</code> metres from <code>relativeTo</code> will be excluded. If no matching entities are found, an empty array is returned.<br />
<br />
'''See Also:''' <code>[[#shipsWithPrimaryRole|shipsWithPrimaryRole]]()</code>, <code>[[#shipsWithRole|shipsWithRole]]()</code>, <code>[[#filteredEntities|filteredEntities]]()</code>.<br />
<br />
=== <code>filteredEntities</code> ===<br />
function '''filteredEntities'''(this : Object, predicate : Function [, relativeTo : {{oojsclass|Entity}} [, range : Number]]) : Array<br />
A list of the entities for which <code>predicate</code> returns <code>true</code>. If <code>relativeTo</code> is specified, the list will be sorted in order of proximity to <code>relativeTo</code> (i.e., the first element of the list is closest). If <code>range</code> is also specified, entities further than <code>range</code> metres from <code>relativeTo</code> will be excluded. If no matching entities are found, an empty array is returned.<br />
<br />
'''Example:'''<br />
this.findIdlePoliceInScannerRange = function()<br />
{<br />
function $isIdlePolice(entity)<br />
{<br />
return entity.isShip && entity.isPolice && !entity.target<br />
}<br />
<br />
return system.filteredEntities(this, $isIdlePolice, player.ship, 25600);<br />
}<br />
<br />
'''See Also:''' <code>[[#shipsWithPrimaryRole|shipsWithPrimaryRole]]()</code>, <code>[[#shipsWithRole|shipsWithRole]]()</code>, <code>[[#entitiesWithScanClass|entitiesWithScanClass]]()</code>.<br />
<br />
=== <code>legacy_addShips etc.</code> ===<br />
function '''legacy_addShips'''(role : String, count : Number)<br />
function '''legacy_addSystemShips'''(role : String, count : Number, position : Number)<br />
function '''legacy_addShipsAt'''(role : String, count : Number, coordscheme : String, where : {{oojsvecexpr}})<br />
function '''legacy_addShipsAtPrecisely'''(role : String, count : Number, coordscheme : String, where : {{oojsclass|Planet}})<br />
function '''legacy_addShipsWithinRadius'''(role : String, count : Number, coordScheme : String, where : {{oojsclass|Planet}}, radius : Number)<br />
function '''legacy_spawnShip'''(shipDataKey : String)<br />
Various ways of causing ships to appear. Each of these corresponds to a legacy scripting method. For more info about the <code>coordScheme</code>, look at [[Oolite coordinate systems]]. These methods are kept for backwards-compatibility; for new development, <code>[[#addShips|addShips()]]</code> is preferred.<br />
<br />
'''Important:''' <code>legacy_spawn</code>, previously listed here, never worked as intended and has been replaced with <code>Ship.[[Oolite JavaScript Reference: Ship#spawn|spawn]]()</code>.<br />
<br />
=== <code>locationFromCode</code> ===<br />
{{oolite-method-added|1.79}}<br />
'''locationFromCode(code)''' : Vector<br />
Returns a random location in the region specified by the code string. The code strings are the same as used by the [[Oolite_System_Populator|Oolite populator]]<br />
<br />
=== <code>scrambledPseudoRandomNumber</code>===<br />
function '''scrambledPseudoRandomNumber'''(salt : Number (integer)) : Number<br />
Returns a number that’s greater than or equal to zero and less than one. It will always return the same value for a given <code>salt</code> value and system. Crucially, the relationship between systems and numbers is effectively completely different for each salt value, so scripts making similar decisions based on <code>scrambledPseudoRandomNumber()</code> but using different salts will get uncorrelated results. For example, if two different OXPs add a certain type of station to 25% of systems using <code>if (system.pseudoRandomNumber < 0.25)</code>, the two station types will always be found in the same system; using <code>scrambledPseudoRandomNumber()</code> with different salts avoids this.<br />
<br />
=== <code>sendAllShipsAway</code> ===<br />
function '''sendAllShipsAway'''()<br />
Makes all ships hyperspace out of the system.<br />
<br />
=== <code>setPopulator</code> ===<br />
{{oolite-method-added|1.79}}<br />
'''setPopulator(key : String, definition : Object)'''<br />
Sets the [[Oolite_System_Populator|populator settings]] for the specified key to the given definition, or deletes them if the definition is null. Calling this outside of the system population set up is possible but useless. See the populator settings page for more information on the format of the <code>definition</code> object.<br />
<br />
'''See Also:''' <code>[[#populatorSettings|populatorSettings]]</code><br />
<br />
=== <code>setWaypoint</code> ===<br />
{{oolite-method-added|1.79}}<br />
'''setWaypoint(key : String, position : VectorExpression, orientation : QuaternionExpression, parameters : Object)'''<br />
Adds a waypoint to the system with the given <code>key</code>, placed at the specified <code>position</code> and <code>orientation</code>. <code>parameter</code> is an object with the following optional keys:<br />
* '''size''': the radius of the waypoint in metres<br />
* '''beaconCode''': the beacon code (default "W")<br />
* '''beaconLabel''': the beacon label (default "Waypoint")<br />
Waypoints will be visible only when the player has a working Advanced Space Compass.<br />
<br />
'''setWaypoint(key : String)'''<br />
Removes the waypoint with the specified <code>key</code>, if it exists.<br />
<br />
In Oolite 1.81, waypoints can either be oriented (the 1.80 default) or unoriented. Unoriented waypoints do not display the directional arrows. To create an unoriented waypoint, set its orientation to the zero quaternion (0,0,0,0) either on creation or later.<br />
<br />
'''See Also:''' <code>[[#waypoints|waypoints]]</code><br />
<br />
=== <code>shipsWithPrimaryRole</code> ===<br />
function '''shipsWithPrimaryRole'''(role : String [, relativeTo : {{oojsclass|Entity}} [, range : Number]]) : Array<br />
A list of the entities in the system whose [[Oolite JavaScript Reference: Ship#primaryRole|primary role]] is <code>role</code>. If <code>relativeTo</code> is specified, the list will be sorted in order of proximity to <code>relativeTo</code> (i.e., the first element of the list is closest). If <code>range</code> is also specified, entities further than <code>range</code> metres from <code>relativeTo</code> will be excluded. If no matching entities are found, an empty array is returned.<br />
<br />
'''See Also:''' <code>[[#shipsWithRole|shipsWithRole]]()</code>, <code>[[#entitiesWithScanClass|entitiesWithScanClass]]()</code>, <code>[[#filteredEntities|filteredEntities]]()</code>.<br />
<br />
=== <code>shipsWithRole</code> ===<br />
function '''shipsWithRole'''(role : String [, relativeTo : {{oojsclass|Entity}} [, range : Number]]) : Array<br />
A list of the entities in the system whose [[Oolite JavaScript Reference: Ship#roles|role set]] contains <code>role</code>. If <code>relativeTo</code> is specified, the list will be sorted in order of proximity to <code>relativeTo</code> (i.e., the first element of the list is closest). If <code>range</code> is also specified, entities further than <code>range</code> metres from <code>relativeTo</code> will be excluded. If no matching entities are found, an empty array is returned.<br />
<br />
'''See Also:''' <code>[[#shipsWithRole|shipsWithRole]]()</code>, <code>[[#entitiesWithScanClass|entitiesWithScanClass]]()</code>, <code>[[#filteredEntities|filteredEntities]]()</code>.<br />
<br />
<br />
== Static Methods ==<br />
=== <code>infoForSystem</code> ===<br />
function '''infoForSystem'''(galaxyNumber: Integer, systemID : Integer) (write-only)<br />
Overwrites existing info of the given system. As properties it uses the [[planetinfo.plist]] keys. e.g.<br />
System.infoForSystem(0, 55).description = "This is a dull planet."<br />
sets the description of planet nr 55 in galaxy 0 to "This is a dull planet."<br />
<br />
Starting from Oolite 1.73, all system Info for the present galaxy is also readable. Even though any galaxy system info property is fully settable, due to engine limitations other galaxies' data is not accessible. In other words<br />
System.infoForSystem(0, 55).description<br />
would return "This is a dull planet." if called from galaxy 0, and throw an exception if called from the other galaxies.<br />
<br />
=== <code>systemIDForName</code> ===<br />
function '''systemIDForName'''(systemName : String) : Integer<br />
Returns the ID number of a system in the current galaxy based on the system name.<br />
<br />
'''Note:''' in galaxy 8, there are two systems named “Inzaan”. <code>systemIDForName()</code> will return the lower ID, which is 22.<br />
<br />
=== <code>systemNameForID</code> ===<br />
function '''systemNameForID'''(systemID : Integer) : String<br />
Returns the name of a system in the current galaxy based on the given ID number.<br />
<br />
<br />
[[Category:Oolite JavaScript Reference]]</div>Alaric