mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 10:41:30 -08:00
Fixed tests
This commit is contained in:
parent
fff8f20745
commit
4cc40ca1ac
5 changed files with 8 additions and 9 deletions
Binary file not shown.
|
|
@ -1,5 +1,6 @@
|
||||||
package mindustry.content;
|
package mindustry.content;
|
||||||
|
|
||||||
|
import mindustry.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
|
|
||||||
import static mindustry.content.Planets.*;
|
import static mindustry.content.Planets.*;
|
||||||
|
|
@ -175,6 +176,9 @@ public class SectorPresets{
|
||||||
240 //Cold Grove by wpx: https://discord.com/channels/391020510269669376/1165421701362897000/1230550892718194742
|
240 //Cold Grove by wpx: https://discord.com/channels/391020510269669376/1165421701362897000/1230550892718194742
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Vars.content.sector("sector-serpulo-173").captureWave = 17;
|
||||||
|
Vars.content.sector("sector-serpulo-240").captureWave = 40;
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
//region erekir
|
//region erekir
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ public class CrashHandler{
|
||||||
|
|
||||||
//don't create crash logs for custom builds, as it's expected
|
//don't create crash logs for custom builds, as it's expected
|
||||||
if(OS.username.equals("anuke") && !"steam".equals(Version.modifier)){
|
if(OS.username.equals("anuke") && !"steam".equals(Version.modifier)){
|
||||||
// System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//attempt to load version regardless
|
//attempt to load version regardless
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,9 @@ public class DirectConsumerTests extends PowerTestFixture{
|
||||||
testUnitFactory(30, 30, 0.08f, 0.08f, 1.0f);
|
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){
|
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;
|
hasPower = true;
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
consumePower(requestedPower);
|
consumePower(requestedPower);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import arc.util.*;
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.core.*;
|
import mindustry.core.*;
|
||||||
import mindustry.ctype.*;
|
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
@ -32,12 +31,7 @@ public class PowerTestFixture{
|
||||||
boolean make = content == null;
|
boolean make = content == null;
|
||||||
|
|
||||||
if(make){
|
if(make){
|
||||||
Vars.content = new ContentLoader(){
|
Vars.content = new ContentLoader();
|
||||||
@Override
|
|
||||||
public void handleMappableContent(MappableContent content){
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
Vars.state = new GameState();
|
Vars.state = new GameState();
|
||||||
Vars.tree = new FileTree();
|
Vars.tree = new FileTree();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue