Cleanup, possible junction fix
This commit is contained in:
@@ -48,7 +48,7 @@ import java.util.Arrays;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class Control extends Module{
|
||||
io.anuke.mindustry.game.Tutorial tutorial = new io.anuke.mindustry.game.Tutorial();
|
||||
Tutorial tutorial = new Tutorial();
|
||||
boolean hiscore = false;
|
||||
|
||||
final Array<Weapon> weapons = new Array<>();
|
||||
|
||||
@@ -21,7 +21,7 @@ import io.anuke.ucore.util.Mathf;
|
||||
import io.anuke.ucore.util.Tmp;
|
||||
public class Block{
|
||||
private static int lastid;
|
||||
private static Array<Block> blocks = new Array<Block>();
|
||||
private static Array<Block> blocks = new Array<>();
|
||||
private static ObjectMap<String, Block> map = new ObjectMap<>();
|
||||
|
||||
protected static TextureRegion temp = new TextureRegion();
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Junction extends Block{
|
||||
@Override
|
||||
public void handleItem(Item item, Tile tile, Tile source){
|
||||
int dir = source.relativeTo(tile.x, tile.y);
|
||||
Tile to = tile.getNearby()[dir];
|
||||
Tile to = tile.getNearby(temptiles)[dir];
|
||||
|
||||
Timers.run(30, ()->{
|
||||
if(to == null) return;
|
||||
@@ -34,7 +34,7 @@ public class Junction extends Block{
|
||||
public boolean acceptItem(Item item, Tile tile, Tile source){
|
||||
int dir = source.relativeTo(tile.x, tile.y);
|
||||
if(dir == -1) return false;
|
||||
Tile to = tile.getNearby()[dir];
|
||||
Tile to = tile.getNearby(temptiles)[dir];
|
||||
return to != null && to.block().acceptItem(item, to, tile);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user