diff --git a/core/src/mindustry/editor/WaveInfoDialog.java b/core/src/mindustry/editor/WaveInfoDialog.java index 10c4751bd7..690d467edf 100644 --- a/core/src/mindustry/editor/WaveInfoDialog.java +++ b/core/src/mindustry/editor/WaveInfoDialog.java @@ -95,7 +95,7 @@ public class WaveInfoDialog extends BaseDialog{ dialog.hide(); }).marginLeft(12f).disabled(b -> Core.app.getClipboardText() == null || Core.app.getClipboardText().isEmpty()).row(); - t.button("@settings.reset", Icon.upload, style, () -> ui.showConfirm("@confirm", "@settings.clear.confirm", () -> { + t.button("@settings.reset", Icon.upload, style, () -> ui.showConfirm("@confirm", "@settings.clear.confirm", () -> { groups = JsonIO.copy(waves.get()); buildGroups(); dialog.hide(); diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 92014d9829..26dc1284e1 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -1035,7 +1035,12 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, /** Called *after* the tile has been removed. */ public void afterDestroyed(){ - + if(block.destroyBullet != null){ + //I really do not like that the bullet will not destroy derelict + //but I can't do anything about it without using a random team + //which may or may not cause issues with servers and js + block.destroyBullet.create(this, Team.derelict, x, y, 0); + } } /** @return the cap for item amount calculations, used when this block explodes. */ diff --git a/core/src/mindustry/graphics/LightRenderer.java b/core/src/mindustry/graphics/LightRenderer.java index b117b984bc..1a83e7d548 100644 --- a/core/src/mindustry/graphics/LightRenderer.java +++ b/core/src/mindustry/graphics/LightRenderer.java @@ -182,6 +182,7 @@ public class LightRenderer{ public void draw(){ if(!Vars.enableLight){ lights.clear(); + circleIndex = 0; return; } diff --git a/core/src/mindustry/ui/dialogs/ContentInfoDialog.java b/core/src/mindustry/ui/dialogs/ContentInfoDialog.java index 9e120155b4..d234c1ca72 100644 --- a/core/src/mindustry/ui/dialogs/ContentInfoDialog.java +++ b/core/src/mindustry/ui/dialogs/ContentInfoDialog.java @@ -31,7 +31,7 @@ public class ContentInfoDialog extends BaseDialog{ table.table(title1 -> { title1.image(content.uiIcon).size(iconXLarge).scaling(Scaling.fit); - title1.add("[accent]" + content.localizedName).padLeft(5); + title1.add("[accent]" + content.localizedName + (enableConsole ? "\n[gray]" + content.name : "")).padLeft(5); }); table.row(); diff --git a/core/src/mindustry/ui/dialogs/DatabaseDialog.java b/core/src/mindustry/ui/dialogs/DatabaseDialog.java index b718950950..f9fdd9853e 100644 --- a/core/src/mindustry/ui/dialogs/DatabaseDialog.java +++ b/core/src/mindustry/ui/dialogs/DatabaseDialog.java @@ -98,7 +98,7 @@ public class DatabaseDialog extends BaseDialog{ ui.content.show(unlock); } }); - image.addListener(new Tooltip(t -> t.background(Tex.button).add(unlock.localizedName))); + image.addListener(new Tooltip(t -> t.background(Tex.button).add(unlock.localizedName + (enableConsole ? "\n[gray]" + unlock.name : "")))); } if((++count) % cols == 0){ diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index f75d256bef..1f1dce4ddd 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -29,6 +29,7 @@ import mindustry.world.blocks.*; import mindustry.world.blocks.environment.*; import mindustry.world.blocks.power.*; import mindustry.world.consumers.*; +import mindustry.entities.bullet.*; import mindustry.world.meta.*; import java.lang.reflect.*; @@ -132,6 +133,8 @@ public class Block extends UnlockableContent{ public int health = -1; /** base block explosiveness */ public float baseExplosiveness = 0f; + /** bullet that this block spawns when destroyed */ + public @Nullable BulletType destroyBullet = null; /** whether this block can be placed on edges of liquids. */ public boolean floating = false; /** multiblock size */ diff --git a/core/src/mindustry/world/blocks/distribution/MassDriver.java b/core/src/mindustry/world/blocks/distribution/MassDriver.java index f60d6b3c17..1531dc360c 100644 --- a/core/src/mindustry/world/blocks/distribution/MassDriver.java +++ b/core/src/mindustry/world/blocks/distribution/MassDriver.java @@ -252,6 +252,7 @@ public class MassDriver extends Block{ @Override public boolean onConfigureTileTapped(Building other){ if(this == other){ + if(link == -1) deselect(); configure(-1); return false; } diff --git a/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java b/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java index 922a93899b..41dffd0279 100644 --- a/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java +++ b/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java @@ -432,6 +432,7 @@ public class PayloadMassDriver extends PayloadBlock{ @Override public boolean onConfigureTileTapped(Building other){ if(this == other){ + if(link == -1) deselect(); configure(-1); return false; } diff --git a/core/src/mindustry/world/blocks/power/Battery.java b/core/src/mindustry/world/blocks/power/Battery.java index b3d36969fc..8a6011cd32 100644 --- a/core/src/mindustry/world/blocks/power/Battery.java +++ b/core/src/mindustry/world/blocks/power/Battery.java @@ -20,6 +20,7 @@ public class Battery extends PowerDistributor{ super(name); outputsPower = true; consumesPower = true; + canOverdrive = false; flags = EnumSet.of(BlockFlag.battery); //TODO could be supported everywhere... envEnabled |= Env.space; diff --git a/core/src/mindustry/world/blocks/storage/CoreBlock.java b/core/src/mindustry/world/blocks/storage/CoreBlock.java index 7d76842a86..a24b92e47b 100644 --- a/core/src/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/mindustry/world/blocks/storage/CoreBlock.java @@ -53,7 +53,6 @@ public class CoreBlock extends StorageBlock{ //support everything envEnabled = Env.any; - drawDisabled = false; replaceable = false; rebuildable = false; } diff --git a/core/src/mindustry/world/blocks/units/CommandCenter.java b/core/src/mindustry/world/blocks/units/CommandCenter.java index 0629727acf..a2e3ad6c2a 100644 --- a/core/src/mindustry/world/blocks/units/CommandCenter.java +++ b/core/src/mindustry/world/blocks/units/CommandCenter.java @@ -118,6 +118,16 @@ public class CommandCenter extends Block{ table.label(() -> team.data().command.localized()).style(Styles.outlineLabel).center().growX().get().setAlignment(Align.center); } + @Override + public boolean onConfigureTileTapped(Building other){ + if(this == other){ + deselect(); + return false; + } + + return true; + } + @Override public void write(Writes write){ super.write(write); diff --git a/servers_v6.json b/servers_v6.json index 39130c65cd..e2d74ea16b 100644 --- a/servers_v6.json +++ b/servers_v6.json @@ -1,8 +1,4 @@ [ - { - "name": "Mindustry Central", - "address": ["n2.mindustry.me:4019", "mindustry.me:2034", "mindustry.me:2035"] - }, { "name": "RCM", "address": ["185.104.248.61", "easyplay.su"] @@ -108,8 +104,8 @@ "address": ["usfr2.forcehost.net:25578"] }, { - "name": "Español", - "address": ["168.119.36.188:41445"] + "name": "Mindustry Español", + "address": ["panel.mindustry.me:2011", "mindustry.me:2034", "mindustry.me:2035"] }, { "name": "CreateDustry", diff --git a/servers_v7.json b/servers_v7.json index c0827a6205..7f5b9fef21 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -23,10 +23,6 @@ "name": "DarkDustry", "address": ["darkdustry.ml", "darkdustry.ml:6000", "darkdustry.ml:7000", "darkdustry.ml:8000", "darkdustry.ml:9000"] }, - { - "name": "SkaarjDustry", - "address": ["skaarjproject.duckdns.org"] - }, { "name": "Chaotic Neutral", "address": ["c-n.ddns.net:5555", "c-n.ddns.net:6666"]