Added Block#allowConfigInventory
This commit is contained in:
@@ -967,7 +967,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
//consume tap event if necessary
|
||||
if(build.interactable(player.team()) && build.block.consumesTap){
|
||||
consumed = true;
|
||||
}else if(build.interactable(player.team()) && build.block.synthetic() && !consumed){
|
||||
}else if(build.interactable(player.team()) && build.block.synthetic() && (!consumed || build.block.allowConfigInventory)){
|
||||
if(build.block.hasItems && build.items.total() > 0){
|
||||
frag.inv.showFor(build);
|
||||
consumed = true;
|
||||
|
||||
@@ -159,6 +159,8 @@ public class Block extends UnlockableContent{
|
||||
public int unitCapModifier = 0;
|
||||
/** Whether the block can be tapped and selected to configure. */
|
||||
public boolean configurable;
|
||||
/** If true, the building inventory can be shown with the config. */
|
||||
public boolean allowConfigInventory = true;
|
||||
/** If true, this block can be configured by logic. */
|
||||
public boolean logicConfigurable = false;
|
||||
/** Whether this block consumes touchDown events when tapped. */
|
||||
|
||||
@@ -51,6 +51,8 @@ public class ItemBridge extends Block{
|
||||
group = BlockGroup.transportation;
|
||||
noUpdateDisabled = true;
|
||||
copyConfig = false;
|
||||
//disabled as to not be annoying
|
||||
allowConfigInventory = false;
|
||||
|
||||
//point2 config is relative
|
||||
config(Point2.class, (ItemBridgeBuild tile, Point2 i) -> tile.link = Point2.pack(i.x + tile.tileX(), i.y + tile.tileY()));
|
||||
|
||||
Reference in New Issue
Block a user