001package com.fs.starfarer.api.impl.campaign.missions.academy;
002
003import com.fs.starfarer.api.Global;
004import com.fs.starfarer.api.Script;
005import com.fs.starfarer.api.campaign.PersonImportance;
006import com.fs.starfarer.api.campaign.econ.MarketAPI;
007import com.fs.starfarer.api.characters.PersonAPI;
008import com.fs.starfarer.api.impl.campaign.ids.Factions;
009import com.fs.starfarer.api.impl.campaign.ids.People;
010import com.fs.starfarer.api.impl.campaign.ids.Ranks;
011import com.fs.starfarer.api.impl.campaign.ids.Tags;
012import com.fs.starfarer.api.impl.campaign.ids.Voices;
013
014public class GAFCReplaceArchon implements Script {
015
016        public void run() {
017                //ImportantPeopleAPI ip = Global.getSector().getImportantPeople();
018                
019                MarketAPI laicaille = Global.getSector().getEconomy().getMarket("laicaille_habitat");
020                if (laicaille == null) return; // if it somehow managed to decivilize or something
021                
022                PersonAPI laicailleArchon = Global.getSector().getImportantPeople().getPerson(People.LAICAILLE_ARCHON);
023                laicailleArchon.setPostId(Ranks.POST_CITIZEN);
024                laicailleArchon.addTag(Tags.INVOLUNTARY_RETIREMENT); // so player can talk to them later.
025                laicailleArchon.setImportance(laicailleArchon.getImportance().prev());
026                laicaille.getCommDirectory().removePerson(laicailleArchon);
027                laicaille.getCommDirectory().addPerson(laicailleArchon, 1000); // back of the comm directory for you, buddy
028        
029        
030                PersonAPI newArchon = Global.getSector().getImportantPeople().getPerson(People.DAMOS_HANNAN);
031                //PersonAPI newArchon = Global.getSector().getFaction(Factions.PERSEAN).createRandomPerson();
032                //newArchon.setRankId(Ranks.GROUND_COLONEL);
033                //newArchon.setPostId(Ranks.POST_BASE_COMMANDER);
034                
035                // gens Hannan; Kazeronian imperialists, basically.
036                //newArchon.getName().setLast("Hannan"); 
037                //newArchon.setImportance(PersonImportance.HIGH);
038                newArchon.addTag(Tags.REPLACEMENT_ARCHON);
039                laicaille.getCommDirectory().getEntryForPerson(newArchon).setHidden(false);
040                
041                // an aristocratic git
042                //newArchon.setVoice(Voices.ARISTO); 
043                
044                laicaille.getCommDirectory().addPerson(newArchon, 0);
045                laicaille.addPerson(newArchon);
046                
047        }
048}
049
050