diff --git a/core/src/mindustry/core/UI.java b/core/src/mindustry/core/UI.java index 49b5afcdda..5253fc9c68 100644 --- a/core/src/mindustry/core/UI.java +++ b/core/src/mindustry/core/UI.java @@ -303,6 +303,7 @@ public class UI implements ApplicationListener, Loadable{ Table table = new Table(); table.touchable = Touchable.disabled; table.setFillParent(true); + table.marginTop(Core.scene.find("coreinfo").getPrefHeight() / Scl.scl() / 2); table.actions(Actions.fadeOut(7f, Interp.fade), Actions.remove()); table.top().add(info).style(Styles.outlineLabel).padTop(10); Core.scene.add(table); @@ -311,8 +312,9 @@ public class UI implements ApplicationListener, Loadable{ /** Shows a fading label at the top of the screen. */ public void showInfoToast(String info, float duration){ Table table = new Table(); - table.setFillParent(true); table.touchable = Touchable.disabled; + table.setFillParent(true); + table.marginTop(Core.scene.find("coreinfo").getPrefHeight() / Scl.scl() / 2); table.update(() -> { if(state.isMenu()) table.remove(); }); diff --git a/core/src/mindustry/entities/comp/BulletComp.java b/core/src/mindustry/entities/comp/BulletComp.java index 788cfaeb8c..4193a823b6 100644 --- a/core/src/mindustry/entities/comp/BulletComp.java +++ b/core/src/mindustry/entities/comp/BulletComp.java @@ -200,6 +200,8 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw type.draw(self()); type.drawLight(self()); + + Draw.reset(); } public void initVel(float angle, float amount){ diff --git a/core/src/mindustry/entities/comp/FireComp.java b/core/src/mindustry/entities/comp/FireComp.java index 88470707dd..bdb8ec33aa 100644 --- a/core/src/mindustry/entities/comp/FireComp.java +++ b/core/src/mindustry/entities/comp/FireComp.java @@ -1,6 +1,7 @@ package mindustry.entities.comp; import arc.*; +import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; import arc.math.geom.*; @@ -115,7 +116,7 @@ abstract class FireComp implements Timedc, Posc, Syncc, Drawc{ } } - Draw.alpha(Mathf.clamp(warmup / warmupDuration)); + Draw.color(Color.white, Mathf.clamp(warmup / warmupDuration)); Draw.z(Layer.effect); Draw.rect(regions[Math.min((int)animation, regions.length - 1)], x + Mathf.randomSeedRange((int)y, 2), y + Mathf.randomSeedRange((int)x, 2)); Draw.reset(); diff --git a/core/src/mindustry/world/blocks/storage/CoreBlock.java b/core/src/mindustry/world/blocks/storage/CoreBlock.java index 65439b000a..b94fceba31 100644 --- a/core/src/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/mindustry/world/blocks/storage/CoreBlock.java @@ -116,7 +116,7 @@ public class CoreBlock extends StorageBlock{ @Override public boolean canReplace(Block other){ //coreblocks can upgrade smaller cores - return super.canReplace(other) || (other instanceof CoreBlock && size > other.size); + return super.canReplace(other) || (other instanceof CoreBlock && size >= other.size && other != this); } @Override