mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Fixed tests
This commit is contained in:
parent
fff8f20745
commit
4cc40ca1ac
5 changed files with 8 additions and 9 deletions
|
|
@ -29,8 +29,9 @@ public class DirectConsumerTests extends PowerTestFixture{
|
|||
testUnitFactory(30, 30, 0.08f, 0.08f, 1.0f);
|
||||
}
|
||||
|
||||
static int fakes = 0;
|
||||
void testUnitFactory(int siliconAmount, int leadAmount, float producedPower, float requestedPower, float expectedSatisfaction){
|
||||
Tile ct = createFakeTile(0, 0, new GenericCrafter("fakefactory"){{
|
||||
Tile ct = createFakeTile(0, 0, new GenericCrafter("fakefactory" + (fakes ++)){{
|
||||
hasPower = true;
|
||||
hasItems = true;
|
||||
consumePower(requestedPower);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import arc.util.*;
|
|||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.*;
|
||||
|
|
@ -32,12 +31,7 @@ public class PowerTestFixture{
|
|||
boolean make = content == null;
|
||||
|
||||
if(make){
|
||||
Vars.content = new ContentLoader(){
|
||||
@Override
|
||||
public void handleMappableContent(MappableContent content){
|
||||
|
||||
}
|
||||
};
|
||||
Vars.content = new ContentLoader();
|
||||
}
|
||||
Vars.state = new GameState();
|
||||
Vars.tree = new FileTree();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue