Bugfixes
This commit is contained in:
@@ -167,6 +167,14 @@ public class Teams{
|
||||
public CoreEntity core(){
|
||||
return cores.first();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "TeamData{" +
|
||||
"cores=" + cores +
|
||||
", team=" + team +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
/** Represents a block made by this team that was destroyed somewhere on the map.
|
||||
|
||||
@@ -264,6 +264,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
@Override
|
||||
public void handleStack(Item item, int amount, Tile tile, Unit source){
|
||||
ConveyorEntity e = tile.ent();
|
||||
amount = Math.min(amount, itemCapacity - e.len);
|
||||
|
||||
for(int i = amount - 1; i >= 0; i--){
|
||||
e.add(0);
|
||||
|
||||
@@ -214,6 +214,16 @@ public class ApplicationTests{
|
||||
assertTrue(state.teams.playerCores().size > 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
void conveyorCrash(){
|
||||
world.loadMap(testMap);
|
||||
state.set(State.playing);
|
||||
|
||||
world.tile(0, 0).setBlock(Blocks.conveyor);
|
||||
world.tile(0, 0).rotation(0);
|
||||
Blocks.conveyor.acceptStack(Items.copper, 1000, world.tile(0, 0), null);
|
||||
}
|
||||
|
||||
@Test
|
||||
void conveyorBench(){
|
||||
int[] items = {0};
|
||||
|
||||
Reference in New Issue
Block a user