Faster power graph reload / Fixed iOS editor margin

This commit is contained in:
Anuken 2020-12-27 12:59:49 -05:00
parent a04e7d5612
commit f174d1b2b4
7 changed files with 52 additions and 38 deletions

View file

@ -95,14 +95,13 @@ public class PowerTestFixture{
// Simulate the "changed" method. Calling it through reflections would require half the game to be initialized.
tile.build = block.newBuilding().init(tile, Team.sharded, false, 0);
if(block.hasPower){
tile.build.power.graph = new PowerGraph(){
new PowerGraph(){
//assume there's always something consuming power
@Override
public float getUsageFraction(){
return 1f;
}
};
tile.build.power.graph.add(tile.build);
}.add(tile.build);
}
// Assign incredibly high health so the block does not get destroyed on e.g. burning Blast Compound