Starsector API
Loading...
Searching...
No Matches
PersonImportance.java
Go to the documentation of this file.
1package com.fs.starfarer.api.campaign;
2
3
4public enum PersonImportance {
5
6 VERY_LOW("Very Low", 0f),
7 LOW("Low", 0.25f),
8 MEDIUM("Medium", 0.5f),
9 HIGH("High", 0.75f),
10 VERY_HIGH("Very High", 1f)
11 ;
12
13
14 private final String displayName;
15 private final float value;
16 private PersonImportance(String displayName, float value) {
17 this.displayName = displayName;
18 this.value = value;
19 }
20 public String getDisplayName() {
21 return displayName;
22 }
23 public float getValue() {
24 return value;
25 }
26
27 private static PersonImportance [] vals = values();
29 int index = this.ordinal() + 1;
30 if (index >= vals.length) index = vals.length - 1;
31 return vals[index];
32 }
34 int index = this.ordinal() - 1;
35 if (index < 0) index = 0;
36 return vals[index];
37 }
38
39}