mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 15:27:19 +07:00
Zone wave bugfix / New tests / More "encouragement"
This commit is contained in:
@ -23,9 +23,10 @@ stat.deconstructed = Buildings Deconstructed:[accent] {0}
|
||||
stat.delivered = Resources Launched:
|
||||
stat.rank = Final Rank: [accent]{0}
|
||||
|
||||
placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\n\nTry it.
|
||||
removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\n\nTry it.
|
||||
placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\n\n[scarlet]DO IT.
|
||||
removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\n\n[scarlet]DO IT.
|
||||
|
||||
launcheditems = [accent]Launched Items
|
||||
map.delete = Are you sure you want to delete the map "[accent]{0}[]"?
|
||||
level.highscore = High Score: [accent]{0}
|
||||
level.select = Level Select
|
||||
|
@ -123,7 +123,7 @@ public class Zones implements ContentList{
|
||||
rules = () -> new Rules(){{
|
||||
waves = true;
|
||||
waveTimer = true;
|
||||
waveSpacing = 60 * 60 * 1.5f;
|
||||
waveSpacing = 60 * 60 * 1.3f;
|
||||
}};
|
||||
}};
|
||||
|
||||
|
@ -95,7 +95,7 @@ public class MapGenerator extends Generator{
|
||||
tiles[x][y].setBlock(Blocks.air);
|
||||
}
|
||||
|
||||
if(tiles[x][y].block() == Blocks.spawn){
|
||||
if(tiles[x][y].block() == Blocks.spawn && enemySpawns != -1){
|
||||
enemies.add(new Point2(x, y));
|
||||
tiles[x][y].setBlock(Blocks.air);
|
||||
}
|
||||
|
@ -27,6 +27,8 @@ public class ItemsDisplay extends Table{
|
||||
|
||||
table("flat", t -> {
|
||||
t.margin(10).marginLeft(15).marginTop(15f);
|
||||
t.add("$launcheditems").colspan(3).left().padBottom(5);
|
||||
t.row();
|
||||
ObjectIntMap<Item> items = data.items();
|
||||
for(Item item : content.items()){
|
||||
if(item.type == ItemType.material && data.isUnlocked(item)){
|
||||
|
@ -178,6 +178,37 @@ public class ApplicationTests{
|
||||
assertTrue(ran[0]);
|
||||
}
|
||||
|
||||
@Test
|
||||
void manyTimers(){
|
||||
int runs = 100000;
|
||||
int[] total = {0};
|
||||
for(int i = 0; i < runs; i++){
|
||||
Time.run(0.999f, () -> total[0]++);
|
||||
}
|
||||
assertEquals(0, total[0]);
|
||||
Time.update();
|
||||
assertEquals(runs, total[0]);
|
||||
}
|
||||
|
||||
@Test
|
||||
void longTimers(){
|
||||
Time.setDeltaProvider(() -> Float.MAX_VALUE);
|
||||
Time.update();
|
||||
int steps = 100;
|
||||
float delay = 100000f;
|
||||
Time.setDeltaProvider(() -> delay / steps + 0.01f);
|
||||
int runs = 100000;
|
||||
int[] total = {0};
|
||||
for(int i = 0; i < runs; i++){
|
||||
Time.run(delay, () -> total[0]++);
|
||||
}
|
||||
assertEquals(0, total[0]);
|
||||
for(int i = 0; i < steps; i++){
|
||||
Time.update();
|
||||
}
|
||||
assertEquals(runs, total[0]);
|
||||
}
|
||||
|
||||
@Test
|
||||
void save(){
|
||||
world.loadMap(testMap);
|
||||
|
Reference in New Issue
Block a user