"use strict";
this.name = "PlanetFall2_BlackMonks_Conditions";
this.author = "phkb";
this.copyright = "CC-BY-SA-NC 4.0";
this.description = "Condition script";

//-------------------------------------------------------------------------------------------------------------
// ship condition script
this.allowSpawnShip = function(shipKey) {
	switch (shipKey) {
		case "planetFall2_mainSurface_blackMonks":
			if (worldScripts.blackmonks.$monkSystemIDs.indexOf(system.ID) >= 0 && worldScripts.PlanetFall2_BlackMonks._spawn.mainPlanet) return true;
			break;
		case "planetFall2_subSurface_blackMonks":
			if (worldScripts.blackmonks.$monkSystemIDs.indexOf(system.ID) >= 0 && worldScripts.PlanetFall2_BlackMonks._spawn.extraPlanets) return true;
			break;
		case "planetFall2_moonSurface_blackMonks":
			if (worldScripts.blackmonks.$monkSystemIDs.indexOf(system.ID) >= 0 && worldScripts.PlanetFall2_BlackMonks._spawn.moons) return true;
			break;
	}
	return false;
}