Improved liquid bridge throughput
This commit is contained in:
@@ -536,6 +536,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
}
|
||||
|
||||
public void dumpLiquid(Liquid liquid){
|
||||
dumpLiquid(liquid, 2f);
|
||||
}
|
||||
|
||||
public void dumpLiquid(Liquid liquid, float scaling){
|
||||
int dump = this.cdump;
|
||||
|
||||
if(liquids.get(liquid) <= 0.0001f) return;
|
||||
@@ -551,7 +555,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
float ofract = other.liquids.get(liquid) / other.block.liquidCapacity;
|
||||
float fract = liquids.get(liquid) / block.liquidCapacity;
|
||||
|
||||
if(ofract < fract) transferLiquid(other, (fract - ofract) * block.liquidCapacity / 2f, liquid);
|
||||
if(ofract < fract) transferLiquid(other, (fract - ofract) * block.liquidCapacity / scaling, liquid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user