mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
Test fixes
This commit is contained in:
parent
25125f5a9b
commit
b4e7928622
1 changed files with 3 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue