"use strict"; 

// Standard attributes 
this.name           = "liners_populator_script.js"; 
this.author	    = "Thargoid, Smivs";
this.copyright	    = "Creative Commons: attribution, non-commercial, sharealike."; 
this.version        = "1.6.2"; 
this.description    = "Population script for Liners." 

this.shipWillExitWitchspace = function()
	{
	if(!system.isInterstellarSpace)
		{
		this.populator();
		}
	}

this.shipWillLaunchFromStation = function(station)
	{
	if(worldScripts["bigShips_populator"]) // if bigShips is installed, we don't need this script
		{
		delete this.shipWillExitWitchspace;
		delete this.populator;
		log("Big Ships is installed, Liners populator removed");
		}
	else
		{
		this.populator();
		}
	delete this.shipWillLaunchFromStation; // this is only needed for the first launch	
	}

this.populator = function() 
{
 if (system.government > 0 && system.techLevel > 9) 
 {
 system.addShipsToRoute("liners_liner", 1, Math.random(), "wp")
 }
}


