diff --git a/core/assets-raw/sprites/blocks/vault-icon.png b/core/assets-raw/sprites/blocks/vault-icon.png new file mode 100644 index 0000000000..9180cf5498 Binary files /dev/null and b/core/assets-raw/sprites/blocks/vault-icon.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index 94fd7f6f6d..0e1e771dbc 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -1250,9 +1250,16 @@ blocks/vault orig: 16, 16 offset: 0, 0 index: -1 +blocks/vault-icon + rotate: false + xy: 927, 424 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 blocks/water rotate: false - xy: 947, 424 + xy: 737, 302 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1280,7 +1287,7 @@ blocks/weaponfactory index: -1 blocks/weaponfactory-icon rotate: false - xy: 737, 302 + xy: 737, 292 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2637,14 +2644,14 @@ weapons/triblaster-equip index: -1 weapons/vulcan rotate: false - xy: 927, 424 + xy: 937, 424 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/vulcan-equip rotate: false - xy: 937, 424 + xy: 947, 424 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 2565f204a6..deba21b946 100644 Binary files a/core/assets/sprites/sprites.png and b/core/assets/sprites/sprites.png differ diff --git a/core/assets/version.properties b/core/assets/version.properties index c8a34a8c5e..cf163fe531 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Thu Mar 01 23:34:49 EST 2018 +#Thu Mar 01 23:39:21 EST 2018 version=release -androidBuildCode=317 +androidBuildCode=318 name=Mindustry code=3.4 build=custom build diff --git a/core/src/io/anuke/mindustry/world/Block.java b/core/src/io/anuke/mindustry/world/Block.java index 793a11b4cc..2bb6322367 100644 --- a/core/src/io/anuke/mindustry/world/Block.java +++ b/core/src/io/anuke/mindustry/world/Block.java @@ -188,7 +188,7 @@ public class Block{ for(int j = 0; j < nearby.length; j ++){ Tile other = tile.getNearby(nearby[j]); Tile in = tile.getNearby(Edges.getInsideEdges(width)[j]); - if(other != null && other.block().acceptItem(item, other, in)){ + if(other != null && other.block().acceptItem(item, other, in) && canDump(tile, other, item)){ other.block().handleItem(item, other, in); return; } @@ -217,7 +217,7 @@ public class Block{ if(todump != null && item != todump) continue; - if(tile.entity.hasItem(item) && other != null && other.block().acceptItem(item, other, in)){ + if(tile.entity.hasItem(item) && other != null && other.block().acceptItem(item, other, in) && canDump(tile, other, item)){ other.block().handleItem(item, other, in); tile.entity.removeItem(item, 1); i = (byte)((i + 1) % nearby.length); @@ -234,6 +234,11 @@ public class Block{ return false; } + /**Used for dumping items.*/ + public boolean canDump(Tile tile, Tile to, Item item){ + return true; + } + /** * Try offloading an item to a nearby container in its facing direction. Returns true if success. */ diff --git a/core/src/io/anuke/mindustry/world/blocks/types/storage/Vault.java b/core/src/io/anuke/mindustry/world/blocks/types/storage/Vault.java index e8d428ae35..a14f3db3a0 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/storage/Vault.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/storage/Vault.java @@ -46,7 +46,8 @@ public class Vault extends Block { return tile.entity.totalItems() < capacity; } - boolean canOutput(Tile tile, Tile to){ + @Override + public boolean canDump(Tile tile, Tile to, Item item){ return to != null && (to.block() instanceof Vault || to.block() instanceof CoreBlock); } }