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 TradeModGen implements SectorGeneratorPlugin {

	public void generate(SectorAPI sector) {
		
		StarSystemAPI system = sector.getStarSystem("Corvus");
		
		// SectorEntityToken centre = system.getEntityByName("star_yellow");
		
		SectorEntityToken centre = system.createToken(0, 0);
		
        SectorEntityToken Fenris = system.addPlanet(centre, "Fenris", "cryovolcanic", 175, 150, 8400, 300);
    
    SectorEntityToken token = system.createToken(15000, 0);
		system.addSpawnPoint(new TradeConvoySpawnPoint(sector, system, 4, 1, token));
		
	
		// faction api's referenced by string to increase standalone compatibility
		FactionAPI Trade = sector.getFaction( "Trade" );
		Trade.setRelationship( "hegemony",     -1 );
		Trade.setRelationship( "tritachyon",   -1 );
		Trade.setRelationship( "pirates",      -1 );
		Trade.setRelationship( "independent",  0 );
		Trade.setRelationship( "nomads",       -1 );
		Trade.setRelationship( "junk_pirates", -1 );
		Trade.setRelationship( "player",       0 );
		Trade.setRelationship( "gunrunners", -1);
		Trade.setRelationship( "Cerberus", -1);
		
    
    
	}
}
