diff --git a/core/src/mindustry/game/EventType.java b/core/src/mindustry/game/EventType.java index bca54a47b5..7c312b9293 100644 --- a/core/src/mindustry/game/EventType.java +++ b/core/src/mindustry/game/EventType.java @@ -28,6 +28,7 @@ public class EventType{ newGame, tutorialComplete, flameAmmo, + resupplyTurret, turretCool, enablePixelation, exclusionDeath, diff --git a/core/src/mindustry/graphics/g3d/PlanetParams.java b/core/src/mindustry/graphics/g3d/PlanetParams.java index ee31f7d172..68141b5f7f 100644 --- a/core/src/mindustry/graphics/g3d/PlanetParams.java +++ b/core/src/mindustry/graphics/g3d/PlanetParams.java @@ -37,8 +37,4 @@ public class PlanetParams{ public transient int viewW = -1, viewH = -1; /** If true, atmosphere will be drawn regardless of player options. */ public transient boolean alwaysDrawAtmosphere = false; - - //TODO: - //- blur - //- darken } diff --git a/core/src/mindustry/world/blocks/defense/turrets/ItemTurret.java b/core/src/mindustry/world/blocks/defense/turrets/ItemTurret.java index eeff99240d..54ec745bec 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/ItemTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/ItemTurret.java @@ -138,6 +138,10 @@ public class ItemTurret extends Turret{ Events.fire(Trigger.flameAmmo); } + if(totalAmmo == 0){ + Events.fire(Trigger.resupplyTurret); + } + BulletType type = ammoTypes.get(item); if(type == null) return; totalAmmo += type.ammoMultiplier; diff --git a/core/src/mindustry/world/blocks/logic/CanvasBlock.java b/core/src/mindustry/world/blocks/logic/CanvasBlock.java index 09ef5c373c..be143559ee 100644 --- a/core/src/mindustry/world/blocks/logic/CanvasBlock.java +++ b/core/src/mindustry/world/blocks/logic/CanvasBlock.java @@ -1,5 +1,6 @@ package mindustry.world.blocks.logic; +import arc.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.input.*; @@ -142,6 +143,10 @@ public class CanvasBlock extends Block{ int[] curColor = {palette[0]}; boolean[] modified = {false}; + dialog.resized(() -> { + dialog.hide(); + }); + dialog.cont.table(Tex.pane, body -> { body.stack(new Element(){ int lastX, lastY; @@ -191,7 +196,7 @@ public class CanvasBlock extends Block{ } }, new GridImage(canvasSize, canvasSize){{ touchable = Touchable.disabled; - }}).size(500f); + }}).size(mobile && !Core.graphics.isPortrait() ? 290f : 480f); }); dialog.cont.row();