package data.scripts.world;

import java.awt.Color;
import java.util.List;

import com.fs.starfarer.api.campaign.CampaignFleetAPI;
import com.fs.starfarer.api.campaign.CargoAPI;
import com.fs.starfarer.api.campaign.FactionAPI;
import com.fs.starfarer.api.campaign.FleetAssignment;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;
import com.fs.starfarer.api.campaign.SectorGeneratorPlugin;
import com.fs.starfarer.api.campaign.StarSystemAPI;
import com.fs.starfarer.api.campaign.CargoAPI.CrewXPLevel;
import com.fs.starfarer.api.fleet.FleetMemberType;

@SuppressWarnings("unchecked")
public class WPSectorGen implements SectorGeneratorPlugin {

	public void generate(SectorAPI sector) 
	{		
	 StarSystemAPI system = sector.getStarSystem("Corvus");
	 
	 MercenarySpawnPoint msp=new MercenarySpawnPoint(sector, system, 10, 5);
	 system.addSpawnPoint(msp);
	 
	 initFactionRelationships(sector);
	 msp.spawnFleet();	 
	 //msp.spawnFleet();
	 //msp.spawnFleet();

	 SBGDatabase sbgd=new SBGDatabase();

	 ShipBuildersGuildSpawnPoint sbgsp=new ShipBuildersGuildSpawnPoint(sector, system, 15, 3,sbgd);
	 system.addSpawnPoint(sbgsp);

	 SBGExecutiveSpawnPoint sbgesp=new SBGExecutiveSpawnPoint(sector, system, 4, 6,sbgd);
	 system.addSpawnPoint(sbgesp);
	
	}
	
	private void initFactionRelationships(SectorAPI sector) 
	{
	 FactionAPI mercenary=sector.getFaction("mercenary");
	 
	 mercenary.setRelationship("hegemony", -1);
	 mercenary.setRelationship("tritachyon", -1);
	 mercenary.setRelationship("pirates", 0);
	 mercenary.setRelationship("independent", 0);
     mercenary.setRelationship("player", 0);
	 mercenary.setRelationship("alien", -1);
		
	}
	

}
















