diff --git a/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java b/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java index 2e0ef60a4c..95bdd5affa 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java @@ -131,13 +131,16 @@ public class PlacementFragment extends Fragment{ } } }else if(blockSelectEnd || Time.timeSinceMillis(blockSelectSeqMillis) > Core.settings.getInt("blockselecttimeout")){ //1st number of combo, select category - currentCategory = Category.all[i]; - if(input.block != null){ - input.block = getSelectedBlock(currentCategory); + //select only visible categories + if(!getByCategory(Category.all[i]).isEmpty()){ + currentCategory = Category.all[i]; + if(input.block != null){ + input.block = getSelectedBlock(currentCategory); + } + blockSelectEnd = false; + blockSelectSeq = 0; + blockSelectSeqMillis = Time.millis(); } - blockSelectEnd = false; - blockSelectSeq = 0; - blockSelectSeqMillis = Time.millis(); }else{ //select block if(blockSelectSeq == 0){ //2nd number of combo blockSelectSeq = i + 1; @@ -459,4 +462,4 @@ public class PlacementFragment extends Fragment{ Block tileDisplayBlock(){ return hoverTile == null ? null : hoverTile.block().synthetic() ? hoverTile.block() : hoverTile.drop() != null ? hoverTile.overlay().itemDrop != null ? hoverTile.overlay() : hoverTile.floor() : null; } -} \ No newline at end of file +}