This commit is contained in:
Anuken 2022-10-15 09:41:43 -04:00
parent bf6f933686
commit 83ed26a271
4 changed files with 11 additions and 5 deletions

View File

@ -28,6 +28,7 @@ public class EventType{
newGame, newGame,
tutorialComplete, tutorialComplete,
flameAmmo, flameAmmo,
resupplyTurret,
turretCool, turretCool,
enablePixelation, enablePixelation,
exclusionDeath, exclusionDeath,

View File

@ -37,8 +37,4 @@ public class PlanetParams{
public transient int viewW = -1, viewH = -1; public transient int viewW = -1, viewH = -1;
/** If true, atmosphere will be drawn regardless of player options. */ /** If true, atmosphere will be drawn regardless of player options. */
public transient boolean alwaysDrawAtmosphere = false; public transient boolean alwaysDrawAtmosphere = false;
//TODO:
//- blur
//- darken
} }

View File

@ -138,6 +138,10 @@ public class ItemTurret extends Turret{
Events.fire(Trigger.flameAmmo); Events.fire(Trigger.flameAmmo);
} }
if(totalAmmo == 0){
Events.fire(Trigger.resupplyTurret);
}
BulletType type = ammoTypes.get(item); BulletType type = ammoTypes.get(item);
if(type == null) return; if(type == null) return;
totalAmmo += type.ammoMultiplier; totalAmmo += type.ammoMultiplier;

View File

@ -1,5 +1,6 @@
package mindustry.world.blocks.logic; package mindustry.world.blocks.logic;
import arc.*;
import arc.graphics.*; import arc.graphics.*;
import arc.graphics.g2d.*; import arc.graphics.g2d.*;
import arc.input.*; import arc.input.*;
@ -142,6 +143,10 @@ public class CanvasBlock extends Block{
int[] curColor = {palette[0]}; int[] curColor = {palette[0]};
boolean[] modified = {false}; boolean[] modified = {false};
dialog.resized(() -> {
dialog.hide();
});
dialog.cont.table(Tex.pane, body -> { dialog.cont.table(Tex.pane, body -> {
body.stack(new Element(){ body.stack(new Element(){
int lastX, lastY; int lastX, lastY;
@ -191,7 +196,7 @@ public class CanvasBlock extends Block{
} }
}, new GridImage(canvasSize, canvasSize){{ }, new GridImage(canvasSize, canvasSize){{
touchable = Touchable.disabled; touchable = Touchable.disabled;
}}).size(500f); }}).size(mobile && !Core.graphics.isPortrait() ? 290f : 480f);
}); });
dialog.cont.row(); dialog.cont.row();