Starsector API
Loading...
Searching...
No Matches
PLStatColonies.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.plog;
2
3import java.awt.Color;
4
5import com.fs.starfarer.api.Global;
6import com.fs.starfarer.api.campaign.econ.MarketAPI;
7import com.fs.starfarer.api.util.Misc;
8
9public class PLStatColonies extends BasePLStat {
10
11 @Override
12 public long getCurrentValue() {
13 int total = 0;
14 for (MarketAPI curr : Global.getSector().getEconomy().getMarketsCopy()) {
15 if (curr.isPlayerOwned()) {
16 total += curr.getSize();
17 }
18 }
19 return total;
20 }
21
22 @Override
23 public Color getGraphColor() {
24 return Misc.getBasePlayerColor();
25 }
26
27 @Override
28 public String getGraphLabel() {
29 return "Colony size";
30 }
31
32 @Override
33 public String getId() {
34 return "colonies";
35 }
36
37 public long getGraphMax() {
38 return COLONY_MAX;
39 }
40}
static SectorAPI getSector()
Definition Global.java:59