Use a variable to hold getProvider result

This commit is contained in:
Bob Dole 2022-07-09 05:19:11 -04:00
parent dd7f07c7eb
commit ebe164a812

View file

@ -129,8 +129,9 @@ public class ItemDescription {
.addTo(list);
double capacity = BlockStressValues.getCapacity(block);
Couple<Integer> generatedRPM = BlockStressValues.getProvider(block) != null ?
BlockStressValues.getProvider(block).getGeneratedRPM(block)
BlockStressValues.IStressValueProvider stressProvider = BlockStressValues.getProvider(block);
Couple<Integer> generatedRPM = stressProvider != null ?
stressProvider.getGeneratedRPM(block)
: null;
StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.HIGH