Starsector API
Loading...
Searching...
No Matches
GAFCReplaceArchon.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.missions.academy;
2
3import com.fs.starfarer.api.Global;
4import com.fs.starfarer.api.Script;
5import com.fs.starfarer.api.campaign.PersonImportance;
6import com.fs.starfarer.api.campaign.econ.MarketAPI;
7import com.fs.starfarer.api.characters.PersonAPI;
8import com.fs.starfarer.api.impl.campaign.ids.Factions;
9import com.fs.starfarer.api.impl.campaign.ids.People;
10import com.fs.starfarer.api.impl.campaign.ids.Ranks;
11import com.fs.starfarer.api.impl.campaign.ids.Tags;
12import com.fs.starfarer.api.impl.campaign.ids.Voices;
13
14public class GAFCReplaceArchon implements Script {
15
16 public void run() {
17 //ImportantPeopleAPI ip = Global.getSector().getImportantPeople();
18
19 MarketAPI laicaille = Global.getSector().getEconomy().getMarket("laicaille_habitat");
20 if (laicaille == null) return; // if it somehow managed to decivilize or something
21
22 PersonAPI laicailleArchon = Global.getSector().getImportantPeople().getPerson(People.LAICAILLE_ARCHON);
23 laicailleArchon.setPostId(Ranks.POST_CITIZEN);
24 laicailleArchon.addTag(Tags.INVOLUNTARY_RETIREMENT); // so player can talk to them later.
25 laicailleArchon.setImportance(laicailleArchon.getImportance().prev());
26 laicaille.getCommDirectory().removePerson(laicailleArchon);
27 laicaille.getCommDirectory().addPerson(laicailleArchon, 1000); // back of the comm directory for you, buddy
28
29
30 PersonAPI newArchon = Global.getSector().getFaction(Factions.PERSEAN).createRandomPerson();
31 newArchon.setRankId(Ranks.GROUND_COLONEL);
32 newArchon.setPostId(Ranks.POST_BASE_COMMANDER);
33
34 // gens Hannan; Kazeronian imperialists, basically.
35 newArchon.getName().setLast("Hannan");
36 newArchon.setImportance(PersonImportance.HIGH);
37 newArchon.addTag(Tags.REPLACEMENT_ARCHON);
38
39 // an aristocratic git
40 newArchon.setVoice(Voices.ARISTO);
41
42 laicaille.getCommDirectory().addPerson(newArchon, 0);
43 laicaille.addPerson(newArchon);
44
45 }
46}
47
48
static SectorAPI getSector()
Definition Global.java:59