mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 15:19:24 +07:00
Added message for non-building units
This commit is contained in:
parent
8a9c92227d
commit
c8455ddbc8
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=0046591e6664a02c2f6a632963240c991e9afc96
|
||||
archash=b2996f736d5b6870913f5d8b5496fe6033069ac8
|
||||
|
Loading…
Reference in New Issue
Block a user