"use strict";
this.name = "TCAT_door";
this.author = "Thargoid";
this.copyright = "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description = "Script for blast door";
this.version = "2.0";

//----------------------------------------------------------------------------------------
this.shipDied = function (whom, why) {
	if (why != "removed") {
		missionVariables.TCAT_door = "DESTROYED";
	}
}

//----------------------------------------------------------------------------------------
this.shipBeingAttackedByCloaked = function () {
	if (player.ship.isCloaked) {
		player.ship.removeEquipment("EQ_CLOAKING_DEVICE"); // done this way rather than by setEquipmentStatus to 
		player.ship.awardEquipment("EQ_CLOAKING_DEVICE"); // avoid triggering repair bots, repair system or DCN.
		player.consoleMessage(expandMissionText("TCAT_cloak_failed"), 6);
	}
}