mould/preform score: unboxed Integer into int using -1 representing unset state (instead of null).
This commit is contained in:
@@ -40,11 +40,11 @@ public class EasyGiantsFoundryState
|
|||||||
|
|
||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
private Integer mouldScore;
|
private int mouldScore = -1; // starts -1 because mould score is unknown
|
||||||
|
|
||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
private Integer lastKnownCrucibleScore;
|
private int lastKnownCrucibleScore = -1; // will be set when "Pour"ed
|
||||||
|
|
||||||
private final List<Stage> stages = new ArrayList<>();
|
private final List<Stage> stages = new ArrayList<>();
|
||||||
private double heatRangeRatio = 0;
|
private double heatRangeRatio = 0;
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ public class FoundryOverlay3D extends Overlay
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.getMouldScore() == null)
|
if (state.getMouldScore() < 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -310,7 +310,7 @@ public class FoundryOverlay3D extends Overlay
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.getMouldScore() == null || state.getLastKnownCrucibleScore() == null)
|
if (state.getMouldScore() < 0 || state.getLastKnownCrucibleScore() < 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user