| 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));
	}
}
*/
 |