Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Feb 5, 2025
1 parent 0e992f9 commit 54b0bd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/mindustry/entities/comp/BuildingComp.java
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,7 @@ public void dumpLiquid(Liquid liquid, int outputDir){
/** Tries to evenly distribute the specified liquid to nearby blocks. This method will likely be removed in the future! */
public void distributeLiquid(Liquid liquid){
if(liquids.get(liquid) <= 0.0001f) return;
float scaling = 2f;

int dump = this.cdump;

Expand All @@ -894,7 +895,7 @@ public void distributeLiquid(Liquid liquid){
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, liquid);
if(ofract < fract) transferLiquid(other, (fract - ofract) * block.liquidCapacity / scaling, liquid);
}
}
}
Expand Down

0 comments on commit 54b0bd0

Please sign in to comment.