Another fluid tank fix

This commit is contained in:
aidancbrady 2015-05-11 10:42:58 -04:00
parent 1377ec88e8
commit 0b04665055

View file

@ -99,9 +99,10 @@ public class DynamicFluidTank implements IFluidTank
return resource.amount; return resource.amount;
} }
else { else {
int prevNeeded = getNeeded();
if(doFill) if(doFill)
{ {
int prevNeeded = getNeeded();
dynamicTank.structure.fluidStored.amount = getCapacity(); dynamicTank.structure.fluidStored.amount = getCapacity();
if(prevNeeded > 0) if(prevNeeded > 0)
@ -113,7 +114,7 @@ public class DynamicFluidTank implements IFluidTank
} }
} }
return getNeeded(); return prevNeeded;
} }
} }