Added reconstructor blocks

This commit is contained in:
Anuken
2018-06-16 19:41:54 -04:00
parent 6c620182ea
commit 1a8cd2e24c
15 changed files with 833 additions and 450 deletions

View File

@@ -104,9 +104,9 @@ public abstract class InputHandler extends InputAdapter{
//check if tapped block is configurable
if(tile.block().configurable && tile.getTeam() == player.getTeam()){
consumed = true;
if((!frag.config.isShown() //if the config fragment is hidden, show
if(((!frag.config.isShown() && tile.block().shouldShowConfigure(tile, player)) //if the config fragment is hidden, show
//alternatively, the current selected block can 'agree' to switch config tiles
|| frag.config.getSelectedTile().block().onConfigureTileTapped(frag.config.getSelectedTile(), tile))) {
|| (frag.config.isShown() && frag.config.getSelectedTile().block().onConfigureTileTapped(frag.config.getSelectedTile(), tile)))) {
frag.config.showConfig(tile);
}
//otherwise...