Sector -2 0 fix (#322)

* Added a battle mission to Sector (-2,0) as otherwise no core would be spawned

* Fixed a crash which occurred during test execution...

... and could maybe occur during any startup with bad timing

* Added a new class for sector tests ...

... and added a test which makes sure that any predefined sector defines
a spawn point

* Added fix after applying test driven bugfixing
This commit is contained in:
Timmeey86
2018-11-10 21:19:27 -05:00
committed by Anuken
parent 51a51833d4
commit 044390b4b4
3 changed files with 59 additions and 2 deletions
@@ -247,7 +247,7 @@ public class BlockIndexer{
for(int x = quadrantX * structQuadrantSize; x < world.width() && x < (quadrantX + 1) * structQuadrantSize; x++){
for(int y = quadrantY * structQuadrantSize; y < world.height() && y < (quadrantY + 1) * structQuadrantSize; y++){
Tile result = world.tile(x, y);
if(result.block().drops == null || !scanOres.contains(result.block().drops.item)) continue;
if( result == null || result.block().drops == null || !scanOres.contains(result.block().drops.item)) continue;
itemSet.add(result.block().drops.item);
}