Back to Index Page generated: Dec 20, 2024, 7:22:09 AM

Expansion Alerting Cross-hairs

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Automatically varies the gun-sight cross-hairs according to the current danger level. Automatically varies the gun-sight cross-hairs according to the current danger level.
Identifier oolite.oxp.Wildeblood.alerting_crosshairs oolite.oxp.Wildeblood.alerting_crosshairs
Title Alerting Cross-hairs Alerting Cross-hairs
Category Equipment Equipment
Author Wildeblood Wildeblood
Version 1.0 1.0
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://aegidian.org/bb/viewtopic.php?f=4&t=14368 n/a
Download URL https://wiki.alioth.net/img_auth.php/a/a2/Alerting_Crosshairs_1.0.oxz n/a
License Public Domain Public Domain
File Size n/a
Upload date 1610873398

Documentation

Also read http://wiki.alioth.net/index.php/Alerting%20Cross-hairs

Alerting Crosshairs READ ME.txt

---------------------------------
Alerting Crosshairs OXP  ver. 1.0
---------------------------------
  Date: May 16th, 2013
Author: Wildeblood


---------------------
Installation and use:
---------------------

This OXP changes the way the gun-sight cross-hairs behave in Oolite. In standard Oolite the crosshairs change appearance depending on the type of weapons installed. With this OXP installed the cross-hairs instead change depending on the current alert level. At green alert only a minimal centre-mark is shown. When other ships are in the vicinity the larger four-vaned cross-hair, previously associated with the pulse laser, appears. In combat situations the more complex cross-hair, previously associated with the military laser, appears.

The mining laser continues to have its distinctive gun-sight associated with it.

When the advanced space compass is set to its target tracking mode the combat cross-hairs appear, regardless of the current alert level. 

Simply place the Alerting Crosshairs OXP into your "AddOns" folder. No configuration is needed or possible.


-----------
Change Log:
-----------

1.0 (May 16th, 2013) First published.

Equipment

This expansion declares no equipment.

Ships

This expansion declares no ships.

Models

This expansion declares no models.

Scripts

Path
Scripts/alerting_crosshairs.js
"use strict";

this.name    = "Alerting Crosshairs"; // "Wildeblood", 2013.
this.version = "1.0";

/* ====================================================================================
			AUTOMATIC HUD CHANGES
======================================================================================= */

this.alertConditionChanged = function(newState, oldState)
	{
	switch(newState)
		{
		case 1: // "Green Alert"
			{
			player.ship.crosshairs = "alerting-crosshairs-green.plist";
			break;
			}
		case 2: // "Yellow Alert"
			{
			player.ship.crosshairs = "alerting-crosshairs-yellow.plist";
			break;
			}
		case 3: // "Red Alert"
			{
			if (player.alertHostiles)
				{
				player.ship.crosshairs = "alerting-crosshairs-red.plist";
				}
			break;
			}
		}
	}

/* ====================================================================================
			USER-SELECTED HUD CHANGES
======================================================================================= */

this.compassTargetChanged = function(whom, mode)
	{
	if (mode === "COMPASS_MODE_TARGET")
		{
		player.ship.crosshairs = "alerting-crosshairs-red.plist";
		this.$override = true;
		}
	else if (this.$override && !player.alertHostiles)
		{
		this.alertConditionChanged(player.alertCondition, 3);
		this.$override = false;
		}
	}

/* ====================================================================================
			THE END
======================================================================================= */