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

Expansion Military Fuel Injectors

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Military upgrade to the ships fuel injectors, giving a recapture system for unburnt fuel. Military upgrade to the ships fuel injectors, giving a recapture system for unburnt fuel.
Identifier oolite.oxp.Thargoid.MilFuelInj oolite.oxp.Thargoid.MilFuelInj
Title Military Fuel Injectors Military Fuel Injectors
Category Equipment Equipment
Author Thargoid Thargoid
Version 1.03 1.03
Tags equipment equipment
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://wiki.alioth.net/index.php/Military_Fuel_Injectors_OXP n/a
Download URL https://wiki.alioth.net/img_auth.php/5/52/Military_Fuel_Injectors_1.03.oxz n/a
License Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with clauses - see readme file Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with clauses - see readme file
File Size n/a
Upload date 1610873300

Documentation

Also read http://wiki.alioth.net/index.php/Military%20Fuel%20Injectors

Military Fuel Injectors v1.03 ReadMe & License.txt

Military Fuel Injectors OXP by Thargoid.

A little OXP by forum request. It offers a military upgrade to the ships fuel injectors, giving reclaim of unburnt fuel whilst under injection. It is similar to the injection system found on the Vortex (to which it obviously cannot be fitted).

Requires v1.75 or later of Oolite. It will not run on older versions.

--------------------------------------------------------------
Specifications:

Base Cost - 400 credits
Tech Level - 12
Required Equipment - Fuel Injectors

--------------------------------------------------------------

License:

This OXP is released under the Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with the following clauses:

* Whilst you are free (and encouraged) to re-use any of the scripting, models or texturing in this OXP, the usage must be distinct from that within this OXP. Unique identifiers such as (but not limited to) unique shipdata.plist entity keys, mission variables, script names (this.name), equipment identity strings (EQ_), description list arrays and entity roles must not be re-used without prior agreement. Basically if it's unique or would identify or overwrite anything in the original OXP, then you may not re-use it (for obvious compatibility reasons).
* rebundling of this OXP within another distribution is permitted as long as it is unchanged. The following derivates however are permitted and except from the above:
	* the conversion of files between XML and openStep.
	* the merging of files with other files of the same type from other OXPs.
* The license information (either as this file or merged into a larger one) must be included in the OXP.
* Even though it is not compulsory, if you are re-using any sizable or recognisable piece of this OXP, please let me know :)

--------------------------------------------------------------

Instructions:

Unzip the file, and then move the folder "Military Fuel Injectors 1.03.oxp" to the AddOns directory of your Oolite installation. Then start the game up and the ships should be added. 

--------------------------------------------------------------

Version history:

24/07/2011 - Version 1.00, initial release.
07/09/2012 - Version 1.01, script tweak to remove excess velocity after usage (back to non-Newtonian flight!).
12/09/2012 - Version 1.02, change way of increasing the velocity, and cap it at 2.5x normal injector velocity.
18/11/2012 - Version 1.03, remove the velocity boost, as it's still causing too many issues.

Equipment

Name Visible Cost [deci-credits] Tech-Level
Military Injector Upgrade yes 4000 12+

Ships

This expansion declares no ships.

Models

This expansion declares no models.

Scripts

Path
Config/script.js
this.name					= "mil_injectors.js";
this.author					= "Thargoid";
this.copyright				= "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description			= "Script for military fuel injector upgrade";
this.version				= "1.03";

this.startUp = this.shipWillExitWitchspace = function()
	{ this.active = "NO"; }

this.shipWillLaunchFromStation = function()
	{
	if(player.ship.equipmentStatus("EQ_FUEL_INJECTION") !== "EQUIPMENT_OK" || player.ship.equipmentStatus("EQ_MIL_INJECTION") !== "EQUIPMENT_OK")
		{ return; }
	this.active = "NO";
	this.startFuelTimer();
	}
	
this.startFuelTimer = function()
	{
	this.fuelFlag = 0;
	if(this.fuelWatchTimer)
		{ this.fuelWatchTimer.start(); }
	else
		{ this.fuelWatchTimer = new Timer(this, this.checkSpeed,0,1); }
	}

this.shipWillDockWithStation = this.shipDied = this.stopFuelTimer = function()
	{
	this.fuelFlag = 0;
	this.active = "NO";
	if(this.fuelWatchTimer && this.fuelWatchTimer.isRunning) { this.fuelWatchTimer.stop(); } 
	}
	
this.checkSpeed = function()
	{
	if(player.ship.equipmentStatus("EQ_FUEL_INJECTION") !== "EQUIPMENT_OK" || player.ship.equipmentStatus("EQ_MIL_INJECTION") !== "EQUIPMENT_OK") 
		{ 
		this.stopFuelTimer();
		return;
		}

	
	if(player.ship.speed == 7 * player.ship.maxSpeed) // if the ship is under fuel injection (FI is speed x 7, torus is speed x 32)
		{ //  increment flag, looping between 0 and 9
		this.active = "YES";
		this.fuelFlag += 1;
		this.fuelFlag = this.fuelFlag % 8;	
		}
	else
		{
		this.active = "NO";
		return; 
		} // if not under fuel injection, exit function
		
	if(this.fuelFlag == 7) // every 8th second under fuel injection
		{ player.ship.fuel += 0.1; }
	}