Back to Index Page generated: May 8, 2024, 6:16:03 AM

Expansion Countdown to Zero

Content

Warnings

  1. 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 BGS countdown goes down to zero while core countdown goes down to one. This oxp makes the core go down to zero too. BGS countdown goes down to zero while core countdown goes down to one. This oxp makes the core go down to zero too.
Identifier oolite.oxp.spara.countdown_to_zero oolite.oxp.spara.countdown_to_zero
Title Countdown to Zero Countdown to Zero
Category Ambiance Ambiance
Author spara spara
Version 1.0 1.0
Tags
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/5/51/Countdown_to_zero_1.0.oxz n/a
License CC-BY-NC-SA 4.0 CC-BY-NC-SA 4.0
File Size n/a
Upload date 1610873300

Documentation

Also read http://wiki.alioth.net/index.php/Countdown%20to%20Zero

Equipment

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

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
Config/script.js
"use strict";
this.name               = "countdown_to_zero";
this.author               = "spara";
this.copyright            = "2015 Spara";
this.description         = "Make hypercount go to 0";
this.licence     = "CC BY-NC-SA 4.0";

this.shipLaunchedFromStation = function() {
	missionVariables["countdown_to_zero"] = player.ship.hyperspaceSpinTime - 1;
}

this.shipDockedWithStation = function() {
	delete missionVariables["countdown_to_zero"];
}

//start countdown
this.playerStartedJumpCountdown = function(type, seconds) {
	if (type === "standard") {
		missionVariables["countdown_to_zero"] = seconds;
		this.$hyperTimer = new Timer(this,this._hyperDriveCountdown,0,1);
	}
	else if (type === "galactic") {
		missionVariables["countdown_to_zero"] = seconds - 1;
		this.$hyperTimer = new Timer(this,this._hyperDriveCountdown,1,1);
	}
}

//stop countdown
this.playerCancelledJumpCountdown = this.shipWillEnterWitchspace = this.playerJumpFailed = function() {
	if (this.$hyperTimer) {
		this.$hyperTimer.stop();
		delete this.$hyperTimer;
	}
	missionVariables["countdown_to_zero"] = player.ship.hyperspaceSpinTime - 1;
}

//hyper countdown timer function
this._hyperDriveCountdown = function() {
	missionVariables["countdown_to_zero"]--;
}