diff --git a/android/build.gradle b/android/build.gradle index 2c3912aeba..5e2fb3e7f6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:3.3.1' } } diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 7abf4217ca..3a6e61e549 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -257,7 +257,7 @@ launch.unable = [scarlet]Unable to LAUNCH.[] Enemies. launch.confirm = This will launch all resources in your core.\nYou will not be able to return to this base. uncover = Uncover configure = Configure Loadout -configure.locked = [LIGHT_GRAY]Reach wave {0}\nto configure loadout. +configure.locked = [LIGHT_GRAY]Configure loadout at wave {0}. zone.unlocked = [LIGHT_GRAY]{0} unlocked. zone.complete = Zone conditions met. zone.resources = Resources Detected: diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index db20352d6d..a1cbf058f2 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -891,7 +891,7 @@ public class Blocks implements ContentList{ useTime = 40f; consumes.power(23f); consumes.item(Items.blastCompound); - consumes.liquid(Liquids.water, 0.4f); + consumes.liquid(Liquids.cryofluid, 0.8f); }}; //endregion power diff --git a/core/src/io/anuke/mindustry/content/TechTree.java b/core/src/io/anuke/mindustry/content/TechTree.java index a656674c91..4b7a9cbc81 100644 --- a/core/src/io/anuke/mindustry/content/TechTree.java +++ b/core/src/io/anuke/mindustry/content/TechTree.java @@ -234,13 +234,17 @@ public class TechTree implements ContentList{ node(alphaDartPad, () -> { node(deltaPad, () -> { - node(javelinPad); - node(tauPad, () -> { - node(tridentPad); - node(omegaPad, () -> { + node(javelinPad, () -> { + node(tridentPad, () -> { node(glaivePad); }); }); + + node(tauPad, () -> { + node(omegaPad, () -> { + + }); + }); }); node(spiritFactory, () -> { diff --git a/core/src/io/anuke/mindustry/entities/type/FlyingUnit.java b/core/src/io/anuke/mindustry/entities/type/FlyingUnit.java index 4a45929f39..995d4f0551 100644 --- a/core/src/io/anuke/mindustry/entities/type/FlyingUnit.java +++ b/core/src/io/anuke/mindustry/entities/type/FlyingUnit.java @@ -38,7 +38,6 @@ public abstract class FlyingUnit extends BaseUnit{ retarget(() -> { targetClosest(); - if(target == null) targetClosestEnemyFlag(BlockFlag.target); if(target == null) targetClosestEnemyFlag(BlockFlag.producer); if(target == null) targetClosestEnemyFlag(BlockFlag.turret); diff --git a/core/src/io/anuke/mindustry/ui/dialogs/DeployDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/DeployDialog.java index 1fa9eae63d..d2b2f64d90 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/DeployDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/DeployDialog.java @@ -106,93 +106,17 @@ public class DeployDialog extends FloatingDialog{ drawDefaultBackground(x, y); } - - void buildButton(Zone zone, TextButton button){ button.setDisabled(() -> hidden(zone)); button.clicked(() -> info.show(zone)); if(zone.unlocked()){ - //button.table(title -> { button.addImage("icon-zone").padRight(3); button.labelWrap(zone.localizedName()).width(140).growX(); - //}); - - //if(data.getWaveScore(zone) > 0){ - // button.add(Core.bundle.format("bestwave", data.getWaveScore(zone))); - //} - - /* - button.add("$launch").color(Color.LIGHT_GRAY).pad(4); - button.row(); - button.table(req -> { - for(ItemStack stack : zone.deployCost){ - req.addImage(stack.item.region).size(8 * 3); - req.add(stack.amount + "").left(); - } - }).pad(3).growX();*/ }else{ button.addImage("icon-zone-locked"); button.row(); button.add("$locked"); - - /*else{ - button.addImage("icon-zone-locked"); - button.row(); - button.add("$locked").padBottom(6); - - if(!hidden(zone)){ - button.row(); - - button.table(req -> { - req.defaults().left(); - - if(zone.zoneRequirements.length > 0){ - req.table(r -> { - r.add("$complete").colspan(2).left(); - r.row(); - for(Zone other : zone.zoneRequirements){ - r.addImage("icon-zone").padRight(4); - r.add(other.localizedName()).color(Color.LIGHT_GRAY); - r.addImage(data.isCompleted(other) ? "icon-check-2" : "icon-cancel-2") - .color(data.isCompleted(other) ? Color.LIGHT_GRAY : Color.SCARLET).padLeft(3); - r.row(); - } - }); - } - - req.row(); - - if(zone.itemRequirements.length > 0){ - req.table(r -> { - for(ItemStack stack : zone.itemRequirements){ - r.addImage(stack.item.region).size(8 * 3).padRight(4); - r.add(Math.min(data.getItem(stack.item), stack.amount) + "/" + stack.amount) - .color(stack.amount > data.getItem(stack.item) ? Color.SCARLET : Color.LIGHT_GRAY).left(); - r.row(); - } - }).padTop(10); - } - - req.row(); - - if(zone.blockRequirements.length > 0){ - req.table(r -> { - r.add("$research.list").colspan(2).left(); - r.row(); - for(Block block : zone.blockRequirements){ - r.addImage(block.icon(Icon.small)).size(8 * 3).padRight(4); - r.add(block.localizedName).color(Color.LIGHT_GRAY); - r.addImage(data.isUnlocked(block) ? "icon-check-2" : "icon-cancel-2") - .color(data.isUnlocked(block) ? Color.LIGHT_GRAY : Color.SCARLET).padLeft(3); - r.row(); - } - - }).padTop(10); - } - }).growX(); - } - }*/ } } diff --git a/core/src/io/anuke/mindustry/ui/dialogs/ZoneInfoDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/ZoneInfoDialog.java index 35667bd15b..dc13b15bcf 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/ZoneInfoDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/ZoneInfoDialog.java @@ -98,23 +98,25 @@ public class ZoneInfoDialog extends FloatingDialog{ } cont.row(); - cont.table(t -> { + cont.table("button-disabled", t -> { t.left(); - for(ItemStack stack : zone.startingItems){ - t.addImage(stack.item.icon(Item.Icon.medium)).size(8 * 3).padRight(4); - t.label(() -> stack.amount + ""); - } + t.add(!zone.canConfigure() ? Core.bundle.format("configure.locked", zone.configureWave) : "$configure"); + t.row(); + t.table(load -> { + load.left(); + for(ItemStack stack : zone.startingItems){ + load.addImage(stack.item.icon(Item.Icon.medium)).size(8 * 3).padRight(4); + load.label(() -> stack.amount + ""); + } + }).growX().left(); }).growX().left(); } }); cont.row(); - cont.addButton(!zone.canConfigure() ? Core.bundle.format("configure.locked", zone.configureWave) : "$configure", () -> { - - }).disabled(b -> !zone.canConfigure()).size(300f, 70f).padTop(5).get(); - - cont.row(); + //cont.addButton(!zone.canConfigure() ? Core.bundle.format("configure.locked", zone.configureWave) : "$configure", () -> { }).disabled(b -> !zone.canConfigure()).size(300f, 70f).padTop(5).get(); + //cont.row(); Button button = cont.addButton(zone.locked() ? "$uncover" : "$launch", () -> { if(!data.isUnlocked(zone)){ diff --git a/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java b/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java index f6e548ff60..6339d36a54 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java @@ -1,7 +1,6 @@ package io.anuke.mindustry.world.blocks.power; import io.anuke.arc.Core; -import io.anuke.mindustry.entities.Effects; import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.TextureRegion; @@ -11,11 +10,10 @@ import io.anuke.arc.util.Time; import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.entities.Damage; +import io.anuke.mindustry.entities.Effects; import io.anuke.mindustry.entities.type.TileEntity; import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.meta.BlockStat; -import io.anuke.mindustry.world.meta.StatUnit; import java.io.DataInput; import java.io.DataOutput; @@ -59,14 +57,6 @@ public class NuclearReactor extends PowerGenerator{ lightsRegion = Core.atlas.find(name + "-lights"); } - @Override - public void setStats(){ - super.setStats(); - - stats.remove(BlockStat.basePowerGeneration); - stats.add(BlockStat.basePowerGeneration, powerProduction * 60f, StatUnit.powerSecond); - } - @Override public void update(Tile tile){ NuclearReactorEntity entity = tile.entity(); diff --git a/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java b/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java index f0cd76e6d3..4de3eb3f00 100644 --- a/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java @@ -35,7 +35,7 @@ public class CoreBlock extends StorageBlock{ solid = true; update = true; hasItems = true; - flags = EnumSet.of(BlockFlag.target); + flags = EnumSet.of(BlockFlag.target, BlockFlag.producer); } @Remote(called = Loc.server) diff --git a/core/src/io/anuke/mindustry/world/consumers/ConsumePower.java b/core/src/io/anuke/mindustry/world/consumers/ConsumePower.java index b97a935ed4..a88b09a929 100644 --- a/core/src/io/anuke/mindustry/world/consumers/ConsumePower.java +++ b/core/src/io/anuke/mindustry/world/consumers/ConsumePower.java @@ -26,8 +26,7 @@ public class ConsumePower extends Consume{ @Override public void build(Tile tile, Table table){ - //table.add(new ReqImage(new Image("icon-power-requirement"), () -> valid(tile.block(), tile.entity))).size(8*4).padRight(4); - // No tooltip for power + //No tooltip for power, for now } @Override diff --git a/server/src/io/anuke/mindustry/server/ServerControl.java b/server/src/io/anuke/mindustry/server/ServerControl.java index 047ee35155..f4961adac3 100644 --- a/server/src/io/anuke/mindustry/server/ServerControl.java +++ b/server/src/io/anuke/mindustry/server/ServerControl.java @@ -29,6 +29,7 @@ import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemType; import java.io.IOException; +import java.net.BindException; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Scanner; @@ -671,6 +672,8 @@ public class ServerControl implements ApplicationListener{ try{ Net.host(Core.settings.getInt("port")); info("&lcOpened a server on port {0}.", Core.settings.getInt("port")); + }catch(BindException e){ + Log.err("Unable to host: Port already in use! Make sure no other servers are running on the same port in your network."); }catch(IOException e){ err(e); state.set(State.menu);