From fe6f98ec5aa34e4246701e711c81fd192b699147 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 9 Aug 2018 17:44:52 -0400 Subject: [PATCH] Minor bugfixes / Added block names to bundle/ Autogen ore names --- core/assets/bundles/bundle.properties | 15 ++++++++++ .../content/blocks/CraftingBlocks.java | 30 +++++++++---------- .../content/bullets/TurretBullets.java | 4 +-- .../mindustry/ui/dialogs/JoinDialog.java | 12 ++++---- core/src/io/anuke/mindustry/world/Block.java | 2 +- .../mindustry/world/blocks/OreBlock.java | 1 + 6 files changed, 40 insertions(+), 24 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 8d2164dcd8..6416664c65 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -431,6 +431,21 @@ text.liquid.heatcapacity=[LIGHT_GRAY]Heat Capacity: {0} text.liquid.viscosity=[LIGHT_GRAY]Viscosity: {0} text.liquid.temperature=[LIGHT_GRAY]Temperature: {0} +block.deepwater.name=deepwater +block.water.name=water +block.lava.name=lava +block.oil.name=oil +block.blackstone.name=blackstone +block.stone.name=stone +block.dirt.name=dirt +block.sand.name=sand +block.ice.name=ice +block.snow.name=snow +block.grass.name=grass +block.shrub.name=shrub +block.rock.name=rock +block.blackrock.name=blackrock +block.icerock.name=icerock block.tungsten-wall.name=Tungsten Wall block.tungsten-wall-large.name=Large Tungsten Wall block.carbide-wall.name=Carbide Wall diff --git a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java index adc52e7d11..30ede8ab19 100644 --- a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java @@ -164,13 +164,13 @@ public class CraftingBlocks extends BlockList implements ContentList{ separator = new Separator("separator"){{ results = new Item[]{ - null, null, null, null, null, null, null, null, null, null, - Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, - Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, - Items.tungsten, Items.tungsten, Items.tungsten, Items.tungsten, - Items.lead, Items.lead, - Items.coal, Items.coal, - Items.titanium + null, null, null, null, null, null, null, null, null, null, + Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, + Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, + Items.tungsten, Items.tungsten, Items.tungsten, Items.tungsten, + Items.lead, Items.lead, + Items.coal, Items.coal, + Items.titanium }; filterTime = 40f; itemCapacity = 40; @@ -182,14 +182,14 @@ public class CraftingBlocks extends BlockList implements ContentList{ centrifuge = new Separator("centrifuge"){{ results = new Item[]{ - null, null, null, null, null, null, null, null, null, null, null, null, null, - Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, - Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, - Items.tungsten, Items.tungsten, Items.tungsten, Items.tungsten, Items.tungsten, - Items.lead, Items.lead, Items.lead, - Items.coal, Items.coal, Items.coal, - Items.titanium, Items.titanium, - Items.thorium, + null, null, null, null, null, null, null, null, null, null, null, null, null, + Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, Items.sand, + Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, Items.stone, + Items.tungsten, Items.tungsten, Items.tungsten, Items.tungsten, Items.tungsten, + Items.lead, Items.lead, Items.lead, + Items.coal, Items.coal, Items.coal, + Items.titanium, Items.titanium, + Items.thorium, }; hasPower = true; diff --git a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java index d0090d44a4..893cbf4e7a 100644 --- a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java @@ -179,13 +179,13 @@ public class TurretBullets extends BulletList implements ContentList{ } }; - driverBolt = new BulletType(5f, 50){ + driverBolt = new BulletType(5.3f, 50){ { collidesTiles = false; lifetime = 200f; despawneffect = BlockFx.smeltsmoke; hiteffect = BulletFx.hitBulletBig; - drag = 0.02f; + drag = 0.01f; } @Override diff --git a/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java index 1d0295eb40..8f93058b87 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java @@ -12,10 +12,7 @@ import io.anuke.mindustry.net.Net; import io.anuke.ucore.core.Settings; import io.anuke.ucore.core.Timers; import io.anuke.ucore.scene.style.Drawable; -import io.anuke.ucore.scene.ui.Dialog; -import io.anuke.ucore.scene.ui.ImageButton; -import io.anuke.ucore.scene.ui.ScrollPane; -import io.anuke.ucore.scene.ui.TextButton; +import io.anuke.ucore.scene.ui.*; import io.anuke.ucore.scene.ui.layout.Cell; import io.anuke.ucore.scene.ui.layout.Table; import io.anuke.ucore.scene.utils.UIUtils; @@ -49,10 +46,12 @@ public class JoinDialog extends FloatingDialog{ add = new FloatingDialog("$text.joingame.title"); add.content().add("$text.joingame.ip").padRight(5f).left(); - Platform.instance.addDialog(add.content().addField(Settings.getString("ip"), text -> { + TextField field = add.content().addField(Settings.getString("ip"), text -> { Settings.putString("ip", text); Settings.save(); - }).size(320f, 54f).get(), 100); + }).size(320f, 54f).get(); + + Platform.instance.addDialog(field, 100); add.content().row(); add.buttons().defaults().size(140f, 60f).pad(4f); @@ -75,6 +74,7 @@ public class JoinDialog extends FloatingDialog{ add.shown(() -> { add.getTitleLabel().setText(renaming != null ? "$text.server.edit" : "$text.server.add"); + field.setText(renaming.ip); }); shown(() -> { diff --git a/core/src/io/anuke/mindustry/world/Block.java b/core/src/io/anuke/mindustry/world/Block.java index 013b0f8882..f47a4e5f04 100644 --- a/core/src/io/anuke/mindustry/world/Block.java +++ b/core/src/io/anuke/mindustry/world/Block.java @@ -42,7 +42,7 @@ public class Block extends BaseBlock implements Content{ /** internal ID */ public final int id; /** display name */ - public final String formalName; + public String formalName; /** Detailed description of the block. Can be as long as necesary. */ public final String fullDescription; /** whether this block has a tile entity that updates */ diff --git a/core/src/io/anuke/mindustry/world/blocks/OreBlock.java b/core/src/io/anuke/mindustry/world/blocks/OreBlock.java index 1f33c90895..5d79dacc2c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/OreBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/OreBlock.java @@ -14,6 +14,7 @@ public class OreBlock extends Floor{ public OreBlock(Item ore, Floor base){ super("ore-" + ore.name + "-" + base.name); + this.formalName = ore.name + " " + base.formalName; this.drops = new ItemStack(ore, 1); this.base = base; this.variants = 3;