diff --git a/annotations/src/main/resources/revisions/Bullet/1.json b/annotations/src/main/resources/revisions/Bullet/1.json new file mode 100644 index 0000000000..bdb86498f2 --- /dev/null +++ b/annotations/src/main/resources/revisions/Bullet/1.json @@ -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}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/EffectState/1.json b/annotations/src/main/resources/revisions/EffectState/1.json new file mode 100644 index 0000000000..530155f361 --- /dev/null +++ b/annotations/src/main/resources/revisions/EffectState/1.json @@ -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}]} \ No newline at end of file diff --git a/core/src/mindustry/game/Rules.java b/core/src/mindustry/game/Rules.java index 83b0c67e6a..4fc2512923 100644 --- a/core/src/mindustry/game/Rules.java +++ b/core/src/mindustry/game/Rules.java @@ -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. */ diff --git a/core/src/mindustry/ui/fragments/HudFragment.java b/core/src/mindustry/ui/fragments/HudFragment.java index 585577fa0b..b5d21d0db9 100644 --- a/core/src/mindustry/ui/fragments/HudFragment.java +++ b/core/src/mindustry/ui/fragments/HudFragment.java @@ -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()){