Back to Index Page generated: Dec 1, 2024, 3:15:25 AM

Expansion MFD Fast Config

Content

Warnings

  1. http://wiki.alioth.net/index.php/MFD%20Fast%20Config -> 404 Not Found
  2. Information URL mismatch between OXP Manifest and Expansion Manager string length at character position 0

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Primable equipment that allows different sets of MFD to be quickly set up and activated. Primable equipment that allows different sets of MFD to be quickly set up and activated.
Identifier oolite.oxp.phkb.MFDFastConfiguration oolite.oxp.phkb.MFDFastConfiguration
Title MFD Fast Config MFD Fast Config
Category HUDs HUDs
Author phkb phkb
Version 2.2 2.2
Tags MFD, HUDS MFD, HUDS
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL n/a
Download URL https://wiki.alioth.net/img_auth.php/6/67/MFDFastConfiguration.oxz n/a
License CC-BY-NC-SA 4.0 CC-BY-NC-SA 4.0
File Size n/a
Upload date 1610873324

Documentation

readme.txt

MFD Fast Configuration
By Nick Rogers

This OXP aims to add flexibility and control to the layout of MFD displays. MFD's can be useful, but they also take up screen space and can be distracting in certain conditions. This OXP gives you the ability to define different MFD "sets", which can then be quickly activated when required.

Installation and Operation
==========================
After purchasing the MFD Fast Configuration device, and launching your ship, you will be able to prime the device by using the "Shift-N" key sequence. Once it is primed, you can change the mode by pressing the "B" key, and activating the mode by pressing the "N" key.

The available modes are:

- Set current config as set 1                   This sets the current MFD layout as "Set 1".
- Set current config as set 2                   This sets the current MFD layout as "Set 2".
- Set current config as set 3                   This sets the current MFD layout as "Set 3".
- Set current config as Condition Green set     This sets the current MFD layout as the set to apply 
                                                when the alert condition changes to "Green".
- Set current config as Condition Yellow set	This sets the current MFD layout as the set to apply 
                                                when the alert condition changes to "Yellow".
- Set current config as Condition Red set       This sets the current MFD layout as the set to apply 
                                                when the alert condition changes to "Red".
- Set current config as docking set             This sets the current MFD launch as the set to apply 
                                                when the docking process has begun.
- Make set 1 default                            This makes "Set 1" the default set (which will be activated 
                                                when docking and launching).
- Make set 2 default                            This makes "Set 2" the default set (which will be activated 
                                                when docking and launching).
- Make set 3 default                            This makes "Set 3" the default set (which will be activated 
                                                when docking and launching).
- Make Condition Green set default              This makes the "Condition Green" set the default set (which 
                                                will be activated when docking and launching).
- Make Condition Yellow set default             This makes the "Condition Yellow" set the default set (which 
                                                will be activated when docking and launching).
- Make Condition Red set default                This makes the "Condition Red" set the default set (which 
                                                will be activated when docking and launching).
- Delete set 1                                  This deletes "Set 1".
- Delete set 2                                  This deletes "Set 2".
- Delete set 3                                  This deletes "Set 3".
- Delete Condition Green set                    This deletes the "Condition Green".
- Delete Condition Yellow set                   This deletes the "Condition Yellow".
- Delete Condition Red set                      This deletes the "Condition Red".
- Delete docking set                            This deletes the docking set.
- Hide all setting functions from this list     This will hide all the above modes, leaving only the ones below. 
                                                Do this once you have defined all your sets.
- Activate default set                          This will activate whatever set is the default.
- Activate set 1                                This will activate "Set 1".
- Activate set 2                                This will activate "Set 2".
- Activate set 3                                This will activate "Set 3".
- Activate Condition Green set                  This will activate the "Condition Green" set.
- Activate Condition Yellow set                 This will activate the "Condition Yellow" set.
- Activate Condition Red set                    This will activate the "Condition Red" set.
- Activate docking set                          This will activate the docking set.
- Disable/Enable auto-update mode               This will turn off or on the auto-update mode.
- Restore all setting functions to this list    This will restore all the above modes.

Once you have defined all your different sets, it is recommended you activate the "Hide all setting functions from this list" option. This will reduce the number of modes to only the activation modes, allowing for a more streamlined operation.

Once a set has been defined and is selected, it will be automatically updated to the current configuration whenever the alert condition changes (if there is an alert condition to change to), or when the player docks with a station. This can be turned on or off through the control interface with the "Disable/Enable auto-update mode" option.

License
=======
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 4.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/

Version History
===============
2.2
- Added console message acknowledgements for all activation actions.
- If equipment is not installed, no changes will now take place.
- If auto-update mode is off, and the player has made changes to any of the MFD slots, those changes will remain even when another condition set is loaded. The overrides will be in place until the next dock.
- More consistent condition labelling.
- Added a setup guide (txt and pdf versions).

2.1
- Added ability to turn on/off the auto-storing facility.
- Fixed bug when removing the unit.
- Code refactoring.

2.0
- Automatic storing of MFD configurations now available. If the player makes a change to the current MFD configuration while a set is selected, it will be automatically stored if the alert condition changes, or when the player docks with a station. No need to manually store updated configuration.
- Fixed script error that could occur when player ejects.
- Hiding of setting functions was not being applied until the menu had been cycled once.
- Better integration with Station Dock Control's Launch Queue MFD.
- Better integration with the Damage Report MFD and the Bounty System's Warrant Scanner.

1.2
- Fixed Javascript error that can occur when player ship is destroyed.
 
1.1
- Fixed issue where deleting sets would fail, because the function name had a spelling mistake in it.
- Fixed issue where attempting to update an existing set fails.
- Removing equipment will now reset all configuration items.
- Fixed spelling mistake in mode list.
- Better MFD handling if HUD Selector is not installed.
- Moved the "Restore all setting functions to the list" item to end of the list of modes.
- Code refactoring.

1.0
- Initial release

Equipment

Name Visible Cost [deci-credits] Tech-Level
MFD Fast Configuration yes 6000 3+
Remove MFD Fast Configuration no 200 1+

Ships

This expansion declares no ships. This may be related to warnings.

Models

This expansion declares no models. This may be related to warnings.

Scripts

Path
Scripts/mfdfastconfiguration.js
"use strict";
this.name        = "MFDFastConfiguration";
this.author      = "phkb";
this.copyright   = "2016 phkb";
this.description = "Primable equipment that allows different sets of MFD's to be quickly shown.";
this.licence     = "CC BY-NC-SA 3.0";

// need to test without HUD Selector installed

this._sets = [];			// our data array of different MFD sets
this._startpoint = 0;		// starting point for the mode, which will either be 0 or the altstart point
this._curr_mode = -1;		// current mode of the primable equipment
this._altstart = 21;		// alternate starting point when "Hide all setting functions" is enabled
this._default = "";			// default MFD set, to be activated when docking so HUD Selector picks up the right MFD's
this._hudSelectorInstalled = false;
this._currentMFDSet = [];
this._activeMode = true;
this._currentSetName = "";
this._lastSetName = "";
this._playerIsDocking = false;			// flag to indicate the player has requested docking clearance
this._dockTimer = null;					// timer used when docking to determine if the player has exceeded the alotted time
this._trueValues = ["yes", "1", 1, "true", true];
this._changing = [];

// list of different modes
this._modes = [
	"Set current config as set 1",
	"Set current config as set 2",
	"Set current config as set 3",
	"Set current config as Condition Green set",
	"Set current config as Condition Yellow set",
	"Set current config as Condition Red set",
	"Set current config as docking set",
	"Make set 1 default",
	"Make set 2 default",
	"Make set 3 default",
	"Make Condition Green set default",
	"Make Condition Yellow set default",
	"Make Condition Red set default",
	"Delete set 1",
	"Delete set 2",
	"Delete set 3",
	"Delete Condition Green set",
	"Delete Condition Yellow set",
	"Delete Condition Red set",
	"Delete docking set",
	"Hide all setting functions from this list",
	"Activate default set",
	"Activate set 1",
	"Activate set 2",
	"Activate set 3",
	"Activate Condition Green set",
	"Activate Condition Yellow set",
	"Activate Condition Red set",
	"Activate docking set",
	"Disable auto-update mode",
	"Restore all setting functions to this list"
];

//-------------------------------------------------------------------------------------------------------------
this.activated = function() {

	var w = worldScripts.MFDFastConfiguration;

	switch (w._curr_mode) {
		case 0:
			w.$storeMFDSet("set1", false);
			w._currentSetName = "set1";
			player.consoleMessage("Current config saved as set 1");
			break;
		case 1:
			w.$storeMFDSet("set2", false);
			w._currentSetName = "set2";
			player.consoleMessage("Current config saved as set 2");
			break;
		case 2:
			w.$storeMFDSet("set3", false);
			w._currentSetName = "set3";
			player.consoleMessage("Current config saved as set 3");
			break;
		case 3:
			w.$storeMFDSet("setGreen", false);
			w._currentSetName = "setGreen";
			player.consoleMessage("Current config saved as Condition Green set");
			break;
		case 4:
			w.$storeMFDSet("setYellow", false);
			w._currentSetName = "setYellow";
			player.consoleMessage("Current config saved as Condition Yellow set");
			break;
		case 5:
			w.$storeMFDSet("setRed", false);
			w._currentSetName = "setRed";
			player.consoleMessage("Current config saved as Condition Red set");
			break;
		case 6:
			w.$storeMFDSet("setDocking", false);
			w._currentSetName = "setDocking";
			player.consoleMessage("Current config saved as Docking set");
			break;
		case 7:
			w._default = "set1";
			player.consoleMessage("Default now Set 1");
			break;
		case 8:
			w._default = "set2";
			player.consoleMessage("Default now Set 2");
			break;
		case 9:
			w._default = "set3";
			player.consoleMessage("Default now Set 3");
			break;
		case 10:
			w._default = "setGreen";
			player.consoleMessage("Default now Condition Green Set");
			break;
		case 11:
			w._default = "setYellow";
			player.consoleMessage("Default now Condition Yellow Set");
			break;
		case 12:
			w._default = "setRed";
			player.consoleMessage("Default now Condition Red Set");
			break;
		case 13:
			w.$deleteMFDSet("set1");
			break;
		case 14:
			w.$deleteMFDSet("set2");
			break;
		case 15:
			w.$deleteMFDSet("set3");
			break;
		case 16:
			w.$deleteMFDSet("setGreen");
			break;
		case 17:
			w.$deleteMFDSet("setYellow");
			break;
		case 18:
			w.$deleteMFDSet("setRed");
			break;
		case 19:
			w.$deleteMFDSet("setDocking");
			break;
		case 20:
			w._startpoint = this._altstart;
			player.consoleMessage("Setting functions now hidden");
			break;
		case 21:
			if (w._default != "") w.$restoreMFDSet(w._default, false);
			break;
		case 22:
			//this.$updateCurrentSet();
			w.$restoreMFDSet("set1", false);
			break;
		case 23:
			this.$updateCurrentSet();
			w.$restoreMFDSet("set2", false);
			break;
		case 24:
			this.$updateCurrentSet();
			w.$restoreMFDSet("set3", false);
			break;
		case 25:
			this.$updateCurrentSet();
			w.$restoreMFDSet("setGreen", false);
			break;
		case 26:
			this.$updateCurrentSet();
			w.$restoreMFDSet("setYellow", false);
			break;
		case 27:
			this.$updateCurrentSet();
			w.$restoreMFDSet("setRed", false);
			break;
		case 28:
			this.$updateCurrentSet();
			w.$restoreMFDSet("setDocking", false);
			break;
		case 29:
			w._activeMode = !w._activeMode;
			if (w._activeMode === true) {
				w._modes[29] = "Disable auto-update mode";
				player.consoleMessage("Auto-update mode enabled");
			}
			if (w._activeMode === false) {
				w._modes[29] = "Enable auto-update mode";
				player.consoleMessage("Auto-update mode disabled");
			}
			break;
		case 30:
			w._startpoint = 0;
			w._curr_mode = -1;
			player.consoleMessage("Setting functions restored");
			break;
	}
}

//-------------------------------------------------------------------------------------------------------------
this.mode = function() {
	var w = worldScripts.MFDFastConfiguration;
	w._curr_mode += 1;
	// skip the last one (restore functions) if they're in the list already.
	if (w._curr_mode == w._modes.length - 1 && w._startpoint === 0) w._curr_mode += 1;
	if (w._curr_mode == w._modes.length) w._curr_mode = w._startpoint;
	// tell the player what mode they're in
	player.consoleMessage(w._modes[w._curr_mode]);
}

//-------------------------------------------------------------------------------------------------------------
this.$deleteMFDSet = function(setName) {
	// see if the set is stored
	var idx = this.$setNameIndex(setName);
	if (idx >= 0) {
		// found it! delete it and notify the player
		this._sets.splice(idx, 1);
		player.consoleMessage("MFD set deleted");
	} else {
		// notify the player that the set wasn't there to be deleted
		player.consoleMessage("MFD set not found");
	}
	if (this._currentSetName === setName) this._currentSetName = "";
}

//-------------------------------------------------------------------------------------------------------------
this.$storeMFDSet = function(setName, suppressMessages, autoSave) {

	var p = player.ship;
	var config = {};

	// put all the settings in a dictionary object
	if (p && p.multiFunctionDisplayList) {
		for (var i = 0; i < p.multiFunctionDisplayList.length; i++) {
			var noadd = false;
			if (autoSave === true) {
				// these two MFDs autohide themselves, so don't add them to the config
				if (p.multiFunctionDisplayList[i] === "DamageReportMFD" && worldScripts.DamageReportMFD && worldScripts.DamageReportMFD._mode === 1) noadd = true;
				if (p.multiFunctionDisplayList[i] === "BountySystem_WarrantScanner" && worldScripts.BountySystem_WarrantScanner) noadd = true;
			}
			if (noadd === false) config["MFD_" + (i < 10 ? "0" : "") + i] = p.multiFunctionDisplayList[i];
		}
	}

	// see if this set is already stored (meaning we're doing an update)
	var idx = this.$setNameIndex(setName);
	if (idx >= 0) {
		// ok, found it! reset the data here
		this._sets[idx].data = JSON.stringify(config);
	} else {
		// this must be a new one, so store a new set
		this._sets.push({name:setName, data:JSON.stringify(config)});
	}
	// notify the player
	if (suppressMessages == false) player.consoleMessage("MFD set stored");
}

//-------------------------------------------------------------------------------------------------------------
this.$restoreMFDSet = function(setName, suppressMessages) {

	var config = {};

	// see if we've got this set stored
	var idx = this.$setNameIndex(setName);
	if (idx >= 0) {
		config = JSON.parse(this._sets[idx].data);
	} else {
		// report back if not
		if (suppressMessages == false) {
			player.consoleMessage("Selected MFD set not defined");
		}
		return;
	}

	// restore the set
	var p = player.ship;
	if (p && p.isValid && p.multiFunctionDisplayList) {
		// check for the autohiding SDC MFD
		var bSDC = false;
		if (worldScripts.StationDockControl_MFD) {
			if (worldScripts.StationDockControl_MFD._mfdID >= 0) {
				bSDC = true;
				worldScripts.StationDockControl_MFD._mfdID = -1;
			}
		}
		for (var i = 0; i < p.multiFunctionDisplayList.length; i++) {
			var itm = config["MFD_" + (i < 10 ? "0" : "") + i];
			try {
				p.setMultiFunctionDisplay(i, itm);
				if (itm === "LaunchQueueMFD" && bSDC === true) {
					log(this.name, "setting SDC " + i);
					worldScripts.StationDockControl_MFD._mfdID = i;
				}
			}
			catch (err) {
				log(this.name, "!!ERROR: Unable to set MFD " + (i + 1) + " to " + itm);
			}
		}

		// notify the player
		if (suppressMessages == false) {
			player.consoleMessage("MFD set activated");
		}
		this._currentSetName = setName;

		// if the player has made changes outside of active mode, make sure they stay
		// only applies to automatic changes based on condition
		if (this._activeMode === false) {
			for (var i = 0; i < this._changing.length; i++) {
				if (this._changing[i] != "" && this._changing[i] != undefined) {
					p.setMultiFunctionDisplay(i, this._changing[i]);
				}
			}
		}
	}
	p = null;
}

//-------------------------------------------------------------------------------------------------------------
this.$setNameIndex = function(setName) {
	for (var i = 0; i < this._sets.length; i++) {
		if (this._sets[i].name == setName) return i;
	}
	return -1;
}

//-------------------------------------------------------------------------------------------------------------
this.startUpComplete = function() {
	if (missionVariables.MFDFastConfig_Data) {
		this._sets = JSON.parse(missionVariables.MFDFastConfig_Data);
		delete missionVariables.MFDFastConfig_Data;
	}
	if (missionVariables.MFDFastConfig_Default) {
		this._default = missionVariables.MFDFastConfig_Default;
		delete missionVariables.MFDFastConfig_Default;
	}
	if (missionVariables.MFDFastConfig_HideSettings) {
		if (missionVariables.MFDFastConfig_HideSettings == false) {
			this._startpoint = 0;
		} else {
			this._startpoint = this._altstart;
			this._curr_mode = this._startpoint;
		}
		delete missionVariables.MFDFastConfig_HideSettings;
	}
	if (missionVariables.MFDFastConfig_AutoUpdate) {
		this._activeMode = (this._trueValues.indexOf(missionVariables.MFDFastConfig_AutoUpdate) === -1 ? false : true);
		if (this._activeMode === true) this._modes[29] = "Disable auto-update mode";
		if (this._activeMode === false) this._modes[29] = "Enable auto-update mode";
	}
	if (worldScripts.hudselector) this._hudSelectorInstalled = true;
}

//-------------------------------------------------------------------------------------------------------------
this.alertConditionChanged = function(newCondition, oldCondition) {
	if (player.ship.equipmentStatus("EQ_MFD_FAST_CONFIG") != "EQUIPMENT_OK") return;
	// note: I'm spoofing an alert condition of "4", meaning "player is docking"
	if (newCondition === 0) return;
	var idx = 0;
	var idxGr = this.$setNameIndex("setGreen");
	var idxYw = this.$setNameIndex("setYellow");
	var idxRd = this.$setNameIndex("setRed");
	var idxDk = this.$setNameIndex("setDocking");
	if (["set1","set2","set3","setGreen","setYellow","setRed","setDocking"].indexOf(this._currentSetName) >= 0) {
		this._lastSetName = this._currentSetName;
	}
	// auto store the old state before we switch to any alert-condition set (if there are any)
	// but only if we have an alert condition set to switch to
	if (this._activeMode === true && ((newCondition === 1 && idxGr >= 0) || (newCondition === 2 && idxYw >= 0) || (newCondition === 3 && idxRd >= 0) || (newCondition === 4 && idxDk >= 0))) {
		this.$updateCurrentSet();
	}
	if (newCondition === 1) {
		if (idxGr >= 0) this.$restoreMFDSet("setGreen", false);
	}
	if (newCondition === 2) {
		if (idxYw >= 0) this.$restoreMFDSet("setYellow", false);
	}
	if (newCondition === 3) {
		if (idxRd >= 0) this.$restoreMFDSet("setRed", false);
	}
	if (newCondition === 4) {
		if (idxDk >= 0) this.$restoreMFDSet("setDocking", false);
	}
}

//-------------------------------------------------------------------------------------------------------------
this.$updateCurrentSet = function() {
	// auto store the old state before we switch to any alert-condition set (if there are any)
	if (this._activeMode === true) {
		// check for currently active set and update 
		if (["set1","set2","set3","setGreen","setYellow","setRed","setDocking"].indexOf(this._currentSetName) >= 0) {
			var idx = this.$setNameIndex(this._currentSetName);
			if (idx >= 0) this.$storeMFDSet(this._currentSetName, true, true);
		}
	}
}

//-------------------------------------------------------------------------------------------------------------
this.playerWillSaveGame = function() {
	// store all our data
	if (this._sets.length > 0) {
		missionVariables.MFDFastConfig_Data = JSON.stringify(this._sets);
	}
	missionVariables.MFDFastConfig_Default = this._default;
	if (this._startpoint != 0) {
		missionVariables.MFDFastConfig_HideSettings = true;
	} else {
		missionVariables.MFDFastConfig_HideSettings = false;
	}
	missionVariables.MFDFastConfig_AutoUpdate = this._activeMode;
}

//-------------------------------------------------------------------------------------------------------------
this.shipWillDockWithStation = function(station) {
	if (player.ship.equipmentStatus("EQ_MFD_FAST_CONFIG") != "EQUIPMENT_OK") return;
	// auto store the old state before we switch to any alert-condition set (if there are any)
	this.$updateCurrentSet();
	this._changing.length = 0;

	// if we have a docking set, and there's a previous set in play, and we don't have a default 
	// switch to the previous set we had so it can be made the default
	// this is to avoid having the docking set pulled up on launch
	if (this._currentSetName === "setDocking" && this._lastSetName !== "" && this._default === "") {
		this.$restoreMFDSet(this._lastSetName, false);
	}

	if (this._hudSelectorInstalled == false && this._default == "") {
		// save the current config so we can put it back on launch
		this.$storeMFDSet("current", true, true);
	} 
	if (this._default !== "") {
		// restore the default so HUD Selector picks up the correct MFD's
		this.$restoreMFDSet(this._default, true);
	}
	this.$stopTimers();
}

//-------------------------------------------------------------------------------------------------------------
this.shipLaunchedFromStation = function(station) {
	if (player.ship.equipmentStatus("EQ_MFD_FAST_CONFIG") != "EQUIPMENT_OK") return;
	this._playerIsDocking = false;
	// if HUD selector isn't installed, lets restore either the default set (if defined) or what we had when we docked.
	// if HUD selector is installed, it will handle restoring the MFD config for us.
	if (this._hudSelectorInstalled == false) {
		if (this._default != "") {
			// restore the default MFD set
			this.$restoreMFDSet(this._default, true);
		} else {
			this.$restoreMFDSet("current", true);
		}
	}
}

//-------------------------------------------------------------------------------------------------------------
this.playerBoughtEquipment = function(equipmentKey) {
	if (equipmentKey == "EQ_MFD_FAST_CONFIG_REMOVAL") {
		// give the player their money back
		player.credits += 600;
		var p = player.ship;
		p.removeEquipment(equipmentKey);
		p.removeEquipment("EQ_MFD_FAST_CONFIG");
		this._sets = [];
		this._default = "";
		this.startpoint = 0;
		player.consoleMessage("MFD Fast Configuration device removed.");
	}
}

//-------------------------------------------------------------------------------------------------------------
this.mfdKeyChanged = function(index, key) {
	if (player.ship.equipmentStatus("EQ_MFD_FAST_CONFIG") != "EQUIPMENT_OK") return;
	// are we in auto mode? don't do anything if we are
	if (this._activeMode === true) return;
	// if not, make a note of what we're changing
	if (this._changing.length === 0) this._changing = new Array(player.ship.multiFunctionDisplayList.length);
	this._changing[index] = player.ship.multiFunctionDisplayList[index];
}

//-------------------------------------------------------------------------------------------------------------
this.shipDied = function(whom, why) {
	this.$stopTimers();
}

//-------------------------------------------------------------------------------------------------------------
this.playerRequestedDockingClearance = function(message) {
	if (player.ship.equipmentStatus("EQ_MFD_FAST_CONFIG") != "EQUIPMENT_OK") return;
	if (message === "DOCKING_CLEARANCE_GRANTED" || message === "DOCKING_CLEARANCE_EXTENDED" || message === "DOCKING_CLEARANCE_DENIED_TRAFFIC_INBOUND" || message === "DOCKING_CLEARANCE_DENIED_TRAFFIC_OUTBOUND") {
		this._playerIsDocking = true;
		this.alertConditionChanged(4, player.alertCondition);
		if (message === "DOCKING_CLEARANCE_GRANTED" || message === "DOCKING_CLEARANCE_EXTENDED") {
			// start a timer so we can track when the clearance expires
			if (this._dockTimer && this._dockTimer.isRunning) this._dockTimer.stop();
			this._dockTimer = new Timer(this, this.$dockingExpired, 121, 0);
		}
	} else {
		this.alertConditionChanged(player.alertCondition, 4);
		this._playerIsDocking = false;
		if (this._dockTimer && this._dockTimer.isRunning) this._dockTimer.stop();
	}
}

//-------------------------------------------------------------------------------------------------------------
this.playerDockingClearanceCancelled = function() {
	if (player.ship.equipmentStatus("EQ_MFD_FAST_CONFIG") != "EQUIPMENT_OK") return;
	this.alertConditionChanged(player.alertCondition, 4);
	this._playerIsDocking = false;
	if (this._dockTimer && this._dockTimer.isRunning) this._dockTimer.stop();
}

//-------------------------------------------------------------------------------------------------------------
// stops the dock timer
this.$stopTimers = function() {
	// stop the dock timer check timer if it's running
	if (this._dockTimer && this._dockTimer.isRunning) this._dockTimer.stop();
}

//-------------------------------------------------------------------------------------------------------------
// checks for an expired docking request
this.$dockingExpired = function $dockingExpired() {
	if (this._playerIsDocking === true) {
		this.alertConditionChanged(player.alertCondition, 4);
		this._playerIsDocking = false;
	}
}