This commit is contained in:
Anuken 2020-10-22 09:11:48 -04:00
parent 6c13250705
commit f2dd5ba113
5 changed files with 10 additions and 1 deletions

View File

@ -1364,12 +1364,14 @@ public class Blocks implements ContentList{
requirements(Category.effect, with(Items.titanium, 250, Items.thorium, 125));
size = 3;
itemCapacity = 1000;
flags = EnumSet.of(BlockFlag.storage);
}};
container = new StorageBlock("container"){{
requirements(Category.effect, with(Items.titanium, 100));
size = 2;
itemCapacity = 300;
flags = EnumSet.of(BlockFlag.storage);
}};
unloader = new Unloader("unloader"){{

View File

@ -67,7 +67,7 @@ public class Conveyor extends Block implements Autotiler{
@Override
public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){
return (otherblock.outputsItems() || lookingAt(tile, rotation, otherx, othery, otherblock))
return (otherblock.outputsItems() || (lookingAt(tile, rotation, otherx, othery, otherblock) && otherblock.hasItems))
&& lookingAtEither(tile, rotation, otherx, othery, otherrot, otherblock);
}

View File

@ -105,6 +105,10 @@ public class MassDriver extends Block{
Building link = world.build(this.link);
boolean hasLink = linkValid();
if(hasLink){
this.link = link.pos();
}
//reload regardless of state
if(reload > 0f){
reload = Mathf.clamp(reload - edelta() / reloadTime);

View File

@ -11,6 +11,7 @@ import mindustry.world.blocks.storage.CoreBlock.*;
import mindustry.world.meta.*;
public class StorageBlock extends Block{
public StorageBlock(String name){
super(name);
hasItems = true;

View File

@ -4,6 +4,8 @@ package mindustry.world.meta;
public enum BlockFlag{
/** Enemy core; primary target for all units. */
core,
/** Vault/container/etc */
storage,
/** Something that generates power. */
generator,
/** Any turret. */