Back to Index Page generated: Nov 12, 2024, 11:02:03 PM

Expansion Surjectors

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 Your injectors burn almost no fuel when your weapons are offline, but your shields go offline too! Your injectors burn almost no fuel when your weapons are offline, but your shields go offline too!
Identifier oolite.oxp.Astrobe.surjectors oolite.oxp.Astrobe.surjectors
Title Surjectors Surjectors
Category Mechanics Mechanics
Author Astrobe Astrobe
Version 1.2.0 1.2.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/8/8c/Oolite.oxp.Astrobe.surjectors.oxz n/a
License CC-BY-NC-SA 3.0 CC-BY-NC-SA 3.0
File Size n/a
Upload date 1610873357

Documentation

Also read http://wiki.alioth.net/index.php/Surjectors

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    = "Surjectors";
this.version = "1.2.0"; // Astrobe. Based on Bullet Drive by Wildblood, May 16th, 2013
this.$savedInjectorRate=0;
this.$afterBurnersOn=false;
this.$savedAftRate=0;
this.$savedFwdRate=0;
this.$savedERate=0;

this.$afterburnerFCB = function()
{
	var self = player.ship;
	if (self.status !== "STATUS_IN_FLIGHT" && self.status !== "STATUS_WITCHSPACE_COUNTDOWN")
	{
		self.injectorBurnRate=this.$savedInjectorRate;
		self.aftShieldRechargeRate=this.$savedAftRate;
		self.forwardShieldRechargeRate=this.$savedFwdRate;
		self.energyRechargeRate=this.$savedERate;
		removeFrameCallback(this.$monitor);
		delete this.$monitor;
		return;
	}
	else if(self.injectorsEngaged && !self.weaponsOnline)
	{
		self.injectorBurnRate=0.01;
		//self.injectorSpeedFactor=4;
		self.aftShield-=0.1;
		self.forwardShield-=0.1;
		self.aftShieldRechargeRate=0;
		self.forwardShieldRechargeRate=0;
		self.energyRechargeRate=0;
	}
	else
	{
		self.injectorBurnRate=this.$savedInjectorRate;
		self.aftShieldRechargeRate=this.$savedAftRate;
		self.forwardShieldRechargeRate=this.$savedFwdRate;
		self.energyRechargeRate=this.$savedERate;
	}
	//if(self.target && (self.compassMode!="COMPASS_MODE_TARGET")) self.compassMode="COMPASS_MODE_TARGET";
}

this.shipLaunchedFromStation = function(station)
{
	if (!this.$monitor)
	{
		var self = player.ship;
		this.$afterBurnersOn=false;
		this.$savedInjectorRate=self.injectorBurnRate;
		this.$savedAftRate=self.aftShieldRechargeRate;
		this.$savedFwdRate=self.forwardShieldRechargeRate;
		this.$savedERate=self.energyRechargeRate;
		this.$monitor = addFrameCallback(this.$afterburnerFCB.bind(this));
	}
}

this.shipExitedWitchspace= this.shipLaunchedFromStation;
/*
this.shipExitedWitchspace = function()
{
	if (!this.$monitor)
	{
		this.$afterBurnersOn=false;
		this.$monitor = addFrameCallback(this.$afterburnerFCB.bind(this));
	}
}
*/