mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-05 13:08:20 +07:00
Test fixes
This commit is contained in:
parent
25125f5a9b
commit
b4e7928622
@ -55,7 +55,7 @@ public class PowerTests extends PowerTestFixture{
|
||||
|
||||
void simulateDirectConsumption(float producedPower, float requiredPower, float expectedSatisfaction, String parameterDescription){
|
||||
Tile producerTile = createFakeTile(0, 0, createFakeProducerBlock(producedPower));
|
||||
producerTile.<GeneratorBuild>bc().productionEfficiency = 1f;
|
||||
((GeneratorBuild)producerTile.build).productionEfficiency = 1f;
|
||||
Tile directConsumerTile = createFakeTile(0, 1, createFakeDirectConsumer(requiredPower));
|
||||
|
||||
PowerGraph powerGraph = new PowerGraph();
|
||||
@ -95,7 +95,7 @@ public class PowerTests extends PowerTestFixture{
|
||||
|
||||
if(producedPower > 0.0f){
|
||||
Tile producerTile = createFakeTile(0, 0, createFakeProducerBlock(producedPower));
|
||||
producerTile.<GeneratorBuild>bc().productionEfficiency = 1f;
|
||||
((GeneratorBuild)producerTile.build).productionEfficiency = 1f;
|
||||
powerGraph.add(producerTile.build);
|
||||
}
|
||||
Tile directConsumerTile = null;
|
||||
@ -120,7 +120,7 @@ public class PowerTests extends PowerTestFixture{
|
||||
@Test
|
||||
void directConsumptionStopsWithNoPower(){
|
||||
Tile producerTile = createFakeTile(0, 0, createFakeProducerBlock(10.0f));
|
||||
producerTile.<GeneratorBuild>bc().productionEfficiency = 1.0f;
|
||||
((GeneratorBuild)producerTile.build).productionEfficiency = 1.0f;
|
||||
Tile consumerTile = createFakeTile(0, 1, createFakeDirectConsumer(5.0f));
|
||||
|
||||
PowerGraph powerGraph = new PowerGraph();
|
||||
|
Loading…
Reference in New Issue
Block a user