"use strict";
this.name = "TCAT_guardRot";
this.author = "Thargoid";
this.copyright = "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description = "Thargoid Guardian ship swap.";
this.version = "2.0";

//----------------------------------------------------------------------------------------
this.shipSwap = function () {
	var newShip = this.ship.spawnOne('TCAT_guard');
	newShip.orientation = this.ship.orientation.rotate(this.ship.orientation.vectorRight(), (0.5 * Math.PI));
	newShip.position = this.ship.position;
	newShip.energy = this.ship.energy;
	if (this.ship.group) {
		newShip.group = this.ship.group;
	}
	if (this.ship.target) {
		newShip.target = this.ship.target;
	}
	this.ship.remove();
}
