block schematics

This commit is contained in:
J-VdS
2020-08-19 16:11:00 +02:00
parent 66c0c9baa2
commit fe18222c6c
4 changed files with 5 additions and 1 deletions

View File

@@ -38,6 +38,8 @@ public class Rules{
public boolean canGameOver = true;
/** Whether reactors can explode and damage other blocks. */
public boolean reactorExplosions = true;
/** Whether schematics are allowed */
public boolean schematicAllowed = true;
/** Whether units use and require ammo. */
public boolean unitAmmo = false;
/** How fast unit pads build units. */

View File

@@ -89,7 +89,7 @@ public class HudFragment extends Fragment{
select.button(Icon.menu, style, ui.paused::show);
flip = select.button(Icon.upOpen, style, this::toggleMenus).get();
select.button(Icon.paste, style, ui.schematics::show);
select.button(Icon.paste, style, ui.schematics::show).disabled(!state.rules.schematicAllowed);
select.button(Icon.pause, style, () -> {
if(net.active()){