12 public void addConditions(Set<String> conditionsSoFar, GenContext context, PlanetAPI planet) {
14 int orbitIndex = context.orbitIndex;
15 if (context.parent !=
null) orbitIndex = context.parentOrbitIndex;
17 float normalIndex = context.starData.getHabZoneStart() - 1;
18 float veryIndex = context.starData.getHabZoneStart() - 3;
19 float eitherIndex = context.starData.getHabZoneStart() - 2;
21 boolean matchVery = orbitIndex <= veryIndex;
22 boolean matchNormal = !matchVery && orbitIndex <= normalIndex;
23 boolean matchEither = orbitIndex == eitherIndex;
26 matchVery = !matchNormal;
29 boolean hasNormal = conditionsSoFar.contains(Conditions.HOT);
30 boolean hasVery = conditionsSoFar.contains(Conditions.VERY_HOT);
34 if (matchNormal && !hasVery && !hasNormal &&
36 conditionsSoFar.add(Conditions.HOT);
42 if (matchVery && !hasVery &&
44 conditionsSoFar.remove(Conditions.HOT);
45 conditionsSoFar.add(Conditions.VERY_HOT);