@@ -1364,12 +1364,14 @@ public class Blocks implements ContentList{
|
|||||||
requirements(Category.effect, with(Items.titanium, 250, Items.thorium, 125));
|
requirements(Category.effect, with(Items.titanium, 250, Items.thorium, 125));
|
||||||
size = 3;
|
size = 3;
|
||||||
itemCapacity = 1000;
|
itemCapacity = 1000;
|
||||||
|
flags = EnumSet.of(BlockFlag.storage);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
container = new StorageBlock("container"){{
|
container = new StorageBlock("container"){{
|
||||||
requirements(Category.effect, with(Items.titanium, 100));
|
requirements(Category.effect, with(Items.titanium, 100));
|
||||||
size = 2;
|
size = 2;
|
||||||
itemCapacity = 300;
|
itemCapacity = 300;
|
||||||
|
flags = EnumSet.of(BlockFlag.storage);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
unloader = new Unloader("unloader"){{
|
unloader = new Unloader("unloader"){{
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class Conveyor extends Block implements Autotiler{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){
|
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);
|
&& lookingAtEither(tile, rotation, otherx, othery, otherrot, otherblock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,10 @@ public class MassDriver extends Block{
|
|||||||
Building link = world.build(this.link);
|
Building link = world.build(this.link);
|
||||||
boolean hasLink = linkValid();
|
boolean hasLink = linkValid();
|
||||||
|
|
||||||
|
if(hasLink){
|
||||||
|
this.link = link.pos();
|
||||||
|
}
|
||||||
|
|
||||||
//reload regardless of state
|
//reload regardless of state
|
||||||
if(reload > 0f){
|
if(reload > 0f){
|
||||||
reload = Mathf.clamp(reload - edelta() / reloadTime);
|
reload = Mathf.clamp(reload - edelta() / reloadTime);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import mindustry.world.blocks.storage.CoreBlock.*;
|
|||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
public class StorageBlock extends Block{
|
public class StorageBlock extends Block{
|
||||||
|
|
||||||
public StorageBlock(String name){
|
public StorageBlock(String name){
|
||||||
super(name);
|
super(name);
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ package mindustry.world.meta;
|
|||||||
public enum BlockFlag{
|
public enum BlockFlag{
|
||||||
/** Enemy core; primary target for all units. */
|
/** Enemy core; primary target for all units. */
|
||||||
core,
|
core,
|
||||||
|
/** Vault/container/etc */
|
||||||
|
storage,
|
||||||
/** Something that generates power. */
|
/** Something that generates power. */
|
||||||
generator,
|
generator,
|
||||||
/** Any turret. */
|
/** Any turret. */
|
||||||
|
|||||||
Reference in New Issue
Block a user