Starsector API
Loading...
Searching...
No Matches
BaseAICoreOfficerPluginImpl.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign;
2
3import java.awt.Color;
4import java.util.Random;
5
6import com.fs.starfarer.api.Global;
7import com.fs.starfarer.api.campaign.AICoreOfficerPlugin;
8import com.fs.starfarer.api.campaign.econ.CommoditySpecAPI;
9import com.fs.starfarer.api.characters.PersonAPI;
10import com.fs.starfarer.api.ui.Alignment;
11import com.fs.starfarer.api.ui.TooltipMakerAPI;
12
17 public PersonAPI createPerson(String aiCoreId, String factionId, Random random) {
18 return null;
19 }
20
21 public void createPersonalitySection(PersonAPI person, TooltipMakerAPI tooltip) {
22 float opad = 10f;
23 Color text = person.getFaction().getBaseUIColor();
24 Color bg = person.getFaction().getDarkUIColor();
26
27 tooltip.addSectionHeading("Personality: fearless", text, bg, Alignment.MID, 20);
28 tooltip.addPara("In combat, the " + spec.getName() + " is single-minded and determined. " +
29 "In a human captain, its traits might be considered reckless. In a machine, they're terrifying.", opad);
30 }
31
32
33// public StoryPointActionDelegate createIntegrateDelegate(final PersonAPI person, final FleetMemberAPI member) {
34// return new StoryPointActionDelegate() {
35// public String getTitle() {
36// return "Integrating " + person.getNameString() + " into " + member.getShipName();
37// }
38// public TextPanelAPI getTextPanel() {
39// return null;
40// }
41// public float getBonusXPFraction() {
42// return 1f;
43// }
44// public void createDescription(TooltipMakerAPI info) {
45// float opad = 10f;
46// float pad = 3f;
47// float small = 5f;
48// Color h = Misc.getHighlightColor();
49//
50// info.addPara("Fully integrate this AI core into the ship, giving it improved access to all " +
51// "subsystems.", 0f);
52//
53// info.addPara(BaseIntelPlugin.BULLET + "Increases the AI core's level by %s and grants an additional skill", small, h, "1");
54// info.addPara(BaseIntelPlugin.BULLET + "Can not be removed by any means short of scuttling the ship", 0f);
55// }
56//
57// public void confirm() {
58// OfficerLevelupPlugin plugin = (OfficerLevelupPlugin) Global.getSettings().getPlugin("officerLevelUp");
59// List<String> skills = plugin.pickLevelupSkills(person, null);
60// if (!skills.isEmpty()) {
61// Misc.setUnremovable(person, true);
62// person.getStats().setLevel(person.getStats().getLevel() + 1);
63// person.getStats().setSkillLevel(skills.get(0), 2);
64// }
65// }
66// };
67// }
68
69}
70
71
72
73
static SettingsAPI getSettings()
Definition Global.java:57
void createPersonalitySection(PersonAPI person, TooltipMakerAPI tooltip)
PersonAPI createPerson(String aiCoreId, String factionId, Random random)
CommoditySpecAPI getCommoditySpec(String commodityId)
LabelAPI addPara(String format, float pad, Color hl, String... highlights)
LabelAPI addSectionHeading(String str, Alignment align, float pad)