This commit is contained in:
Anuken
2022-09-27 11:57:11 -04:00
parent e21cac75b5
commit 48a5ae443f
3 changed files with 14 additions and 3 deletions

View File

@@ -507,9 +507,7 @@ public class Damage{
} }
public static void tileDamage(Team team, int x, int y, float baseRadius, float damage, @Nullable Bullet source){ public static void tileDamage(Team team, int x, int y, float baseRadius, float damage, @Nullable Bullet source){
Core.app.post(() -> { Core.app.post(() -> {
var in = world.build(x, y); var in = world.build(x, y);
//spawned inside a multiblock. this means that damage needs to be dealt directly. //spawned inside a multiblock. this means that damage needs to be dealt directly.
//why? because otherwise the building would absorb everything in one cell, which means much less damage than a nearby explosion. //why? because otherwise the building would absorb everything in one cell, which means much less damage than a nearby explosion.

View File

@@ -21,7 +21,7 @@ public class LiquidDisplay extends Table{
this.perSecond = perSecond; this.perSecond = perSecond;
add(new Stack(){{ add(new Stack(){{
add(new Image(liquid.uiIcon)); add(new Image(liquid.uiIcon).setScaling(Scaling.fit));
if(amount != 0){ if(amount != 0){
Table t = new Table().left().bottom(); Table t = new Table().left().bottom();

View File

@@ -237,6 +237,19 @@ public class GenericCrafter extends Block{
dumpOutputs(); dumpOutputs();
} }
@Override
public float getProgressIncrease(float baseTime){
//limit progress increase by maximum amount of liquid it can produce
float scaling = 1f;
if(outputLiquids != null){
for(var s : outputLiquids){
scaling = Math.min(scaling, (liquidCapacity - liquids.get(s.liquid)) / (s.amount * edelta()));
}
}
return super.getProgressIncrease(baseTime) * scaling;
}
public float warmupTarget(){ public float warmupTarget(){
return 1f; return 1f;
} }