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