"use strict";
this.name = "draven_carrier_turretToggle.js";
this.author = "Ironfist";
this.copyright = "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description = "Script for swapping over turrets from active to inactive and back.";
this.version = "1.1";

/* based on Vortex script by Thargoid */

this.activated = function () {
	if (worldScripts.draven_station.debug) log(this.name, "Turret Toggle script");
	if (missionVariables.DRAVEN_TURRET === "active") {
		player.consoleMessage(expandMissionText("dr_turrets_inactive"), 6);
		missionVariables.DRAVEN_TURRET = "inactive";
	} else {
		player.consoleMessage(expandMissionText("dr_turrets_active"), 6);
		missionVariables.DRAVEN_TURRET = "active";
	}

	worldScripts["draven_ship_player.js"].turretToggle();
}
