All power distributors now update power graph
Replaced manual power graph update by base implementation call so future changes in base class get applied to all subclasses automatically. Added the call where missing.
This commit is contained in:
@@ -44,7 +44,7 @@ public class FusionReactor extends PowerGenerator{
|
||||
float efficiencyAdded = Mathf.pow(entity.warmup, 4f) * Timers.delta();
|
||||
entity.productionEfficiency = Mathf.clamp(entity.productionEfficiency + efficiencyAdded * increaseOrDecrease);
|
||||
|
||||
tile.entity.power.graph.update();
|
||||
super.update(tile);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -93,6 +93,8 @@ public abstract class ItemGenerator extends PowerGenerator{
|
||||
Effects.effect(explodeEffect, tile.worldx() + Mathf.range(size * tilesize / 2f), tile.worldy() + Mathf.range(size * tilesize / 2f));
|
||||
}
|
||||
}
|
||||
|
||||
super.update(tile);
|
||||
}
|
||||
|
||||
protected abstract float getItemEfficiency(Item item);
|
||||
|
||||
@@ -89,6 +89,8 @@ public abstract class ItemLiquidGenerator extends ItemGenerator{
|
||||
entity.productionEfficiency = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
super.update(tile);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -66,7 +66,7 @@ public abstract class LiquidGenerator extends PowerGenerator{
|
||||
}
|
||||
}
|
||||
|
||||
tile.entity.power.graph.update();
|
||||
super.update(tile);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -128,7 +128,7 @@ public class NuclearReactor extends PowerGenerator{
|
||||
if(entity.heat >= 0.999f){
|
||||
entity.kill();
|
||||
}else{
|
||||
tile.entity.power.graph.update();
|
||||
super.update(tile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user