"use strict";
this.name = "autoSkimmer";
this.author = "Okti";
this.copyright = "(C) Okti";
this.licence = "Creative Commons Attribution - Non-Commercial - Share Alike 3.0";
this.description = "Ship script for autoSkimmer.";

this.shipSpawned = function () {
	//this.ship.reportAIMessages = true;
	this.ship.fuel = 7;
}

this.checkMassLocked = function () {
	if (player.alertMassLocked) {
		if (system.sun.position.distanceTo(this.ship.position) - system.sun.radius > 100000) {
			this.ship.velocity = this.ship.vectorForward.multiply(player.ship.speed);
		} else {
			this.ship.velocity = this.ship.vectorForward.multiply(this.ship.maxSpeed);

		}
	} else {
		this.ship.velocity = this.ship.vectorForward.multiply(player.ship.speed);
	}
}

this.checkMassLocked2 = function () {
	if (player.alertMassLocked) {
		this.ship.velocity = this.ship.vectorForward.multiply(player.ship.speed);
	} else {
		this.ship.velocity = this.ship.vectorForward.multiply(player.ship.speed);
	}
}

this.shipDied = function (whom, why) {}

this.checkFuel = function () {
	if (player.ship.fuel >= 6.9) {
		this.ship.reactToAIMessage("FULL_FUEL");
	}
}

this.removeMe = function () {
	worldScripts["Coyote-Main"].deactivateSkimTracking();
}