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
@@ -0,0 +1 @@
{version:1,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
@@ -0,0 +1 @@
{version:1,fields:[{name:color,type:arc.graphics.Color,size:-1},{name:data,type:java.lang.Object,size:-1},{name:effect,type:mindustry.entities.Effect,size:-1},{name:lifetime,type:float,size:4},{name:offsetX,type:float,size:4},{name:offsetY,type:float,size:4},{name:parent,type:Posc,size:-1},{name:rotation,type:float,size:4},{name:time,type:float,size:4},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
+2
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. */
@@ -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()){