mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 23:28:52 +07:00
parent
6c13250705
commit
f2dd5ba113
@ -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"){{
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user