mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-05-06 04:11:02 -07:00
More minor bugfixes and tweaks to junctions/tunnels
This commit is contained in:
parent
30b4b78f9f
commit
850e1559bf
5 changed files with 12 additions and 9 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 256 B |
Binary file not shown.
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
|
|
@ -1,7 +1,7 @@
|
|||
#Autogenerated file. Do not modify.
|
||||
#Fri Feb 09 00:15:08 EST 2018
|
||||
#Fri Feb 09 10:08:05 EST 2018
|
||||
version=beta
|
||||
androidBuildCode=131
|
||||
androidBuildCode=135
|
||||
name=Mindustry
|
||||
code=3.3
|
||||
build=custom build
|
||||
build=20
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package io.anuke.mindustry.world.blocks.types.distribution;
|
|||
import io.anuke.mindustry.resource.Liquid;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.types.LiquidBlock;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
|
||||
public class LiquidJunction extends Conduit{
|
||||
|
|
@ -24,9 +25,11 @@ public class LiquidJunction extends Conduit{
|
|||
int dir = source.relativeTo(tile.x, tile.y);
|
||||
dir = (dir+4)%4;
|
||||
Tile to = tile.getNearby(dir);
|
||||
|
||||
((LiquidBlock)to.block()).handleLiquid(to, tile, liquid, amount);
|
||||
|
||||
|
||||
Timers.run(20f, () -> {
|
||||
if(to.block() instanceof LiquidBlock && ((LiquidBlock)to.block()).acceptLiquid(to, tile, liquid, amount))
|
||||
((LiquidBlock)to.block()).handleLiquid(to, tile, liquid, amount);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -34,7 +37,7 @@ public class LiquidJunction extends Conduit{
|
|||
int dir = source.relativeTo(dest.x, dest.y);
|
||||
dir = (dir+4)%4;
|
||||
Tile to = dest.getNearby(dir);
|
||||
return to != null && to.block() != this && to.block() instanceof LiquidBlock &&
|
||||
return to != null && to.block() instanceof LiquidBlock &&
|
||||
((LiquidBlock)to.block()).acceptLiquid(to, dest, liquid, amount);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import io.anuke.ucore.util.Bits;
|
|||
|
||||
public class TunnelConveyor extends Block{
|
||||
protected int maxdist = 3;
|
||||
protected float speed = 50; //frames taken to go through this tunnel
|
||||
protected float speed = 53; //frames taken to go through this tunnel
|
||||
protected int capacity = 32;
|
||||
|
||||
protected TunnelConveyor(String name) {
|
||||
|
|
@ -78,7 +78,7 @@ public class TunnelConveyor extends Block{
|
|||
|
||||
if(tunnel != null){
|
||||
Tile to = tunnel.getNearby(tunnel.getRotation());
|
||||
return to != null && !(to.block() instanceof TunnelConveyor) && to.block().acceptItem(item, to, tunnel);
|
||||
return to != null && to.block().acceptItem(item, to, tunnel);
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue