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

Expansion Galactic Hyperdrive Reimagined

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 More ritualistic form of galactic hyperjumping More ritualistic form of galactic hyperjumping
Identifier oolite.oxp.redspear.galdrive_reimagined oolite.oxp.redspear.galdrive_reimagined
Title Galactic Hyperdrive Reimagined Galactic Hyperdrive Reimagined
Category Mechanics Mechanics
Author Redspear Redspear
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/54/Oolite.oxp.redspear.galdrive_reimagined.oxz n/a
License CC-BY-NC-SA 4.0 CC-BY-NC-SA 4.0
File Size n/a
Upload date 1669841500

Documentation

Also read http://wiki.alioth.net/index.php/Galactic%20Hyperdrive%20Reimagined

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
Scripts/galdrive_reimagined.js
this.name			= "galdrive_reimagined";
this.author			= "Redspear";
this.copyright		= "2022 Redspear";
this.licence		= "CC BY-NC-SA 4.0"; 
this.description	= "More ritualistic form of galactic hyperjumping";
this.version		= "1.0";

"use strict";

// render gal drive 'uncharged' by default

this.startUp = function()
{
	this._statusGH = 0;
	player.ship.awardEquipment("EQ_GAL_DRIVE");	//	just for testing
}

//	register fuel scooped and how much of it (will likely need to be from a particularly large or unusual star in future versions)

this.shipScoopedFuel = function()
{
	this._statusGH = _statusGH + 0.1	
	//log(this.name, "gal drive charge " + _statusGH);
}

// test readiness before gal jump commences

this.playerStartedJumpCountdown = function(type)
{
     if (type == "galactic")
		 if (_statusGH < 6.95 || player.ship.fuel < 6.95){
			player.ship.cancelHyperspaceCountdown();
			player.consoleMessage ("Insufficiently Ionized Fuel for Galactic Jump");
	 }
}

// buying fuel doesn't help

this.playerBoughtEquipment = function(eqKey)
{
     if (eqKey == "EQ_FUEL"){
		 this._statusGH = 0;
	 }
}

// gal drive is no longer expendable (might need to think some more about that...)
// also spacetime reorientation wierdness adds some random time to the clock (potentially days)
// and fuel is spent

this.playerEnteredNewGalaxy = function()
{
	var rand_time = Math.floor((Math.random() * (60 - 1) + 1) *  (Math.random() * (60 - 1) + 1) * (Math.random() * (24 - 1) + 1) * (Math.random() * (15 - 1) + 1));
	
     clock.addSeconds(rand_time);
	 this._statusGH = 0;
	 player.ship.fuel = 0;
	 player.ship.awardEquipment("EQ_GAL_DRIVE");
	 player.consoleMessage ("Spacetime Reorientation - ..." + rand_time);
}

//this.playerWillSaveGame = function(message : String)
//{
//     // Your code here
//}