"use strict";
this.name = "cataclysm-conditions";
this.author = "phkb";
this.copyright = "© 2023 phkb";
this.description = "Condition script for equipment.";
this.licence = "CC BY-NC-SA 4.0";

//-------------------------------------------------------------------------------------------------------------
this.allowAwardEquipment = function (equipment, ship, context) {
    if (context === "scripted") return true;
    if (equipment == "EQ_GAL_DRIVE_MOD") {
        if (["STAGE9A", "STAGE9B", "STAGE9Aa", "STAGE9Ba"].indexOf(missionVariables.cataclysm) >= 0) return true;
    }
    return false;
}

//-------------------------------------------------------------------------------------------------------------
this.allowOfferShip = function(shipKey) {
    if (shipKey == "cataclysm-warship-player") {
        if (missionVariables.cataclysm_replica == "AVAILABLE") return true;
    }
    return false;
}