Added message for non-building units

This commit is contained in:
Anuken 2020-02-07 21:56:55 -05:00
parent 8a9c92227d
commit c8455ddbc8
3 changed files with 5 additions and 4 deletions

View File

@ -534,6 +534,7 @@ no = No
info.title = Info
error.title = [crimson]An error has occured
error.crashtitle = An error has occured
unit.nobuild = [scarlet]Unit can't build
blocks.input = Input
blocks.output = Output
blocks.booster = Booster

View File

@ -220,7 +220,7 @@ public class PlacementFragment extends Fragment{
button.update(() -> { //color unplacable things gray
Tilec core = player.closestCore();
Color color = state.rules.infiniteResources || (core != null && (core.items().has(block.requirements, state.rules.buildCostMultiplier) || state.rules.infiniteResources)) ? Color.white : Color.gray;
Color color = (state.rules.infiniteResources || (core != null && (core.items().has(block.requirements, state.rules.buildCostMultiplier) || state.rules.infiniteResources))) && player.isBuilder() ? Color.white : Color.gray;
button.forEach(elem -> elem.setColor(color));
button.setChecked(control.input.block == block);
@ -321,11 +321,11 @@ public class PlacementFragment extends Fragment{
}
}).growX().left().margin(3);
if(state.rules.bannedBlocks.contains(lastDisplay)){
if(state.rules.bannedBlocks.contains(lastDisplay) || !player.isBuilder()){
topTable.row();
topTable.table(b -> {
b.addImage(Icon.cancel).padRight(2).color(Color.scarlet);
b.add("$banned");
b.add(!player.isBuilder() ? "$unit.nobuild" : "$banned");
b.left();
}).padTop(2).left();
}

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=0046591e6664a02c2f6a632963240c991e9afc96
archash=b2996f736d5b6870913f5d8b5496fe6033069ac8