diff --git a/build.gradle b/build.gradle index 9fc594f5f5..37460e9b83 100644 --- a/build.gradle +++ b/build.gradle @@ -79,7 +79,7 @@ project(":core") { apply plugin: "java" dependencies { - compile 'com.github.anuken:ucore:e8865d2b26' + //compile 'com.github.anuken:ucore:99b9102221' compile "com.badlogicgames.gdx:gdx:$gdxVersion" compile "com.badlogicgames.gdx:gdx-ai:1.8.1" } diff --git a/core/assets-raw/sprites/blocks/fluxpump.png b/core/assets-raw/sprites/blocks/fluxpump.png new file mode 100644 index 0000000000..34f0bd0bd2 Binary files /dev/null and b/core/assets-raw/sprites/blocks/fluxpump.png differ diff --git a/core/assets-raw/sprites/blocks/pulseconduit.png b/core/assets-raw/sprites/blocks/pulseconduit.png new file mode 100644 index 0000000000..c047ea56c3 Binary files /dev/null and b/core/assets-raw/sprites/blocks/pulseconduit.png differ diff --git a/core/assets-raw/sprites/blocks/pulseconduitbottom.png b/core/assets-raw/sprites/blocks/pulseconduitbottom.png new file mode 100644 index 0000000000..9516c4df01 Binary files /dev/null and b/core/assets-raw/sprites/blocks/pulseconduitbottom.png differ diff --git a/core/assets-raw/sprites/blocks/pulseconduittop.png b/core/assets-raw/sprites/blocks/pulseconduittop.png new file mode 100644 index 0000000000..aa94217f1d Binary files /dev/null and b/core/assets-raw/sprites/blocks/pulseconduittop.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index f526adfc48..b0792ceeb2 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -256,41 +256,48 @@ blocks/flameturret orig: 10, 10 offset: 0, 0 index: -1 -blocks/grass1 +blocks/fluxpump rotate: false xy: 395, 215 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/grass2 +blocks/grass1 rotate: false xy: 385, 210 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/grass3 +blocks/grass2 rotate: false xy: 395, 205 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/grassblock +blocks/grass3 rotate: false xy: 385, 200 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/grassblock2 +blocks/grassblock rotate: false xy: 385, 190 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 +blocks/grassblock2 + rotate: false + xy: 395, 195 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 blocks/grassedge rotate: false xy: 450, 491 @@ -300,42 +307,42 @@ blocks/grassedge index: -1 blocks/iron1 rotate: false - xy: 390, 160 + xy: 390, 150 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron2 rotate: false - xy: 390, 150 + xy: 401, 358 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/iron3 rotate: false - xy: 401, 358 + xy: 401, 348 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/irondrill rotate: false - xy: 401, 348 + xy: 401, 338 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/ironwall rotate: false - xy: 401, 338 + xy: 401, 328 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/junction rotate: false - xy: 401, 328 + xy: 401, 318 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -349,7 +356,7 @@ blocks/laserturret index: -1 blocks/lava rotate: false - xy: 401, 318 + xy: 401, 308 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -363,21 +370,21 @@ blocks/lavaedge index: -1 blocks/liquiditemjunction rotate: false - xy: 401, 308 + xy: 401, 298 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquidjunction rotate: false - xy: 401, 298 + xy: 401, 288 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/liquidrouter rotate: false - xy: 401, 288 + xy: 401, 278 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -405,14 +412,14 @@ blocks/mortarturret index: -1 blocks/mossblock rotate: false - xy: 401, 268 + xy: 401, 258 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/mossstone rotate: false - xy: 401, 268 + xy: 401, 258 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -426,7 +433,7 @@ blocks/nuclearreactor index: -1 blocks/nuclearreactor-icon rotate: false - xy: 411, 360 + xy: 411, 350 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -440,7 +447,7 @@ blocks/nuclearreactor-small index: -1 blocks/oil rotate: false - xy: 411, 350 + xy: 411, 340 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -454,14 +461,14 @@ blocks/oiledge index: -1 blocks/oilrefinery rotate: false - xy: 411, 340 + xy: 411, 330 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/omnidrill rotate: false - xy: 411, 330 + xy: 411, 320 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -475,42 +482,63 @@ blocks/plasmaturret index: -1 blocks/powerbooster rotate: false - xy: 411, 320 + xy: 411, 310 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/poweredconveyor rotate: false - xy: 411, 310 + xy: 411, 300 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/poweredconveyormove rotate: false - xy: 411, 300 + xy: 411, 290 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlaser rotate: false - xy: 411, 290 + xy: 411, 280 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/powerlaserrouter rotate: false - xy: 411, 280 + xy: 411, 270 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/pulseconduit + rotate: false + xy: 411, 260 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/pulseconduitbottom + rotate: false + xy: 405, 234 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +blocks/pulseconduittop + rotate: false + xy: 405, 224 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/pump rotate: false - xy: 411, 270 + xy: 405, 214 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -524,35 +552,35 @@ blocks/repairturret index: -1 blocks/rock rotate: false - xy: 405, 234 + xy: 405, 194 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rock2 rotate: false - xy: 405, 224 + xy: 405, 184 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rock2shadow rotate: false - xy: 405, 214 + xy: 405, 174 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rockshadow rotate: false - xy: 405, 204 + xy: 230, 119 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/router rotate: false - xy: 405, 194 + xy: 230, 109 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -566,7 +594,7 @@ blocks/shadow index: -1 blocks/shieldgenerator rotate: false - xy: 405, 174 + xy: 230, 99 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -580,21 +608,21 @@ blocks/shotgunturret index: -1 blocks/shrub rotate: false - xy: 240, 119 + xy: 240, 99 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/shrubshadow rotate: false - xy: 230, 99 + xy: 230, 79 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/smelter rotate: false - xy: 240, 109 + xy: 240, 89 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -608,28 +636,28 @@ blocks/sniperturret index: -1 blocks/sorter rotate: false - xy: 230, 89 + xy: 230, 69 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelconveyor rotate: false - xy: 240, 99 + xy: 240, 79 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelconveyormove rotate: false - xy: 230, 79 + xy: 230, 59 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelwall rotate: false - xy: 240, 89 + xy: 240, 69 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -643,49 +671,49 @@ blocks/stone index: -1 blocks/stone1 rotate: false - xy: 230, 69 + xy: 230, 49 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone2 rotate: false - xy: 240, 79 + xy: 240, 59 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone3 rotate: false - xy: 230, 59 + xy: 230, 39 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock rotate: false - xy: 240, 69 + xy: 240, 49 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock2 rotate: false - xy: 230, 49 + xy: 240, 39 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock3 rotate: false - xy: 240, 59 + xy: 250, 115 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stonedrill rotate: false - xy: 230, 39 + xy: 260, 115 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -699,28 +727,28 @@ blocks/stoneedge index: -1 blocks/stonewall rotate: false - xy: 240, 49 + xy: 250, 105 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/teleporter rotate: false - xy: 240, 39 + xy: 250, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/teleporter-top rotate: false - xy: 250, 115 + xy: 260, 105 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/thermalgenerator rotate: false - xy: 260, 115 + xy: 250, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -741,49 +769,49 @@ blocks/titancannon-icon index: -1 blocks/titanium1 rotate: false - xy: 250, 105 + xy: 260, 95 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titanium2 rotate: false - xy: 250, 95 + xy: 250, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titanium3 rotate: false - xy: 260, 105 + xy: 260, 85 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumdrill rotate: false - xy: 250, 85 + xy: 250, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumpurifier rotate: false - xy: 260, 95 + xy: 260, 75 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumshieldwall rotate: false - xy: 250, 75 + xy: 250, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumwall rotate: false - xy: 260, 85 + xy: 260, 65 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -797,7 +825,7 @@ blocks/titaniumwall-large index: -1 blocks/titaniumwall-large-icon rotate: false - xy: 250, 65 + xy: 250, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -811,35 +839,35 @@ blocks/turret index: -1 blocks/uranium1 rotate: false - xy: 260, 65 + xy: 250, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uranium2 rotate: false - xy: 250, 45 + xy: 260, 35 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uranium3 rotate: false - xy: 260, 55 + xy: 270, 109 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uraniumdrill rotate: false - xy: 260, 45 + xy: 270, 99 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/water rotate: false - xy: 250, 35 + xy: 280, 109 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1112,49 +1140,49 @@ enemyarrow index: -1 icon-coal rotate: false - xy: 395, 195 + xy: 385, 180 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-dirium rotate: false - xy: 385, 180 + xy: 395, 185 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-iron rotate: false - xy: 395, 185 + xy: 383, 170 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-steel rotate: false - xy: 383, 170 + xy: 380, 160 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-stone rotate: false - xy: 380, 160 + xy: 380, 150 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-titanium rotate: false - xy: 380, 150 + xy: 395, 175 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 icon-uranium rotate: false - xy: 395, 175 + xy: 390, 160 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1182,28 +1210,28 @@ mechs/player index: -1 shell rotate: false - xy: 405, 184 + xy: 240, 119 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot rotate: false - xy: 230, 119 + xy: 240, 109 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot-long rotate: false - xy: 230, 109 + xy: 230, 89 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanshell rotate: false - xy: 260, 75 + xy: 260, 55 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1657,28 +1685,28 @@ weapons/flamer index: -1 weapons/mortar rotate: false - xy: 401, 278 + xy: 401, 268 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/multigun rotate: false - xy: 401, 258 + xy: 411, 360 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/railgun rotate: false - xy: 411, 260 + xy: 405, 204 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/triblaster rotate: false - xy: 250, 55 + xy: 260, 45 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index ec1a0b28ce..3c10c4fbd0 100644 Binary files a/core/assets/sprites/sprites.png and b/core/assets/sprites/sprites.png differ diff --git a/core/src/io/anuke/mindustry/Fx.java b/core/src/io/anuke/mindustry/Fx.java index 7e97243ccd..159ea33268 100644 --- a/core/src/io/anuke/mindustry/Fx.java +++ b/core/src/io/anuke/mindustry/Fx.java @@ -151,6 +151,13 @@ public class Fx{ Draw.reset(); }), + purifystone = new Effect(10, e -> { + Draw.color(Color.ORANGE, Color.GRAY, e.ifract()); + Draw.thickness(2f); + Draw.spikes(e.x, e.y, e.ifract() * 4f, 2, 6); + Draw.reset(); + }), + generate = new Effect(11, e -> { Draw.color(Color.ORANGE, Color.YELLOW, e.ifract()); Draw.thickness(1f); diff --git a/core/src/io/anuke/mindustry/UI.java b/core/src/io/anuke/mindustry/UI.java index 5b8ce52e0a..1232b371f1 100644 --- a/core/src/io/anuke/mindustry/UI.java +++ b/core/src/io/anuke/mindustry/UI.java @@ -245,7 +245,7 @@ public class UI extends SceneModule{ int rows = 4; int maxcol = 0; - float size = 46; + float size = 48; Stack stack = new Stack(); ButtonGroup group = new ButtonGroup<>(); diff --git a/core/src/io/anuke/mindustry/entities/BulletType.java b/core/src/io/anuke/mindustry/entities/BulletType.java index b4477bc27d..16f6812e2b 100644 --- a/core/src/io/anuke/mindustry/entities/BulletType.java +++ b/core/src/io/anuke/mindustry/entities/BulletType.java @@ -236,7 +236,7 @@ public abstract class BulletType extends BaseBulletType{ lifetime = 65f; } public void draw(Bullet b){ - Draw.color(Color.valueOf("c2efd7"), Color.valueOf("72deaf"), b.time/lifetime); + Draw.color(Color.valueOf("efa66c"), Color.valueOf("72deaf"), b.time/lifetime); float size = 7f-b.time/lifetime*6f; Draw.rect("circle", b.x, b.y, size, size); Draw.reset(); diff --git a/core/src/io/anuke/mindustry/entities/effect/EMP.java b/core/src/io/anuke/mindustry/entities/effect/EMP.java index e2d6a280f9..2f2a11e859 100644 --- a/core/src/io/anuke/mindustry/entities/effect/EMP.java +++ b/core/src/io/anuke/mindustry/entities/effect/EMP.java @@ -82,7 +82,7 @@ public class EMP extends TimedEntity{ } Draw.thick(fract()*2f); - Draw.circle(x, y, radius * Vars.tilesize); + Draw.polygon(34, x, y, radius * Vars.tilesize); Draw.reset(); } diff --git a/core/src/io/anuke/mindustry/resource/Recipe.java b/core/src/io/anuke/mindustry/resource/Recipe.java index 1ff5390365..1f0016e7ab 100644 --- a/core/src/io/anuke/mindustry/resource/Recipe.java +++ b/core/src/io/anuke/mindustry/resource/Recipe.java @@ -16,17 +16,16 @@ public enum Recipe{ //compositewall(defense, DefenseBlocks.compositewall, stack(Item.dirium, 2), stack(Item.titanium, 2), stack(Item.steel, 2), stack(Item.iron, 2)), titaniumwalllarge(defense, DefenseBlocks.titaniumwalllarge, stack(Item.titanium, 8)), duriumwalllarge(defense, DefenseBlocks.diriumwalllarge, stack(Item.dirium, 8)), - healturret(defense, DefenseBlocks.repairturret, stack(Item.iron, 30)), - megahealturret(defense, DefenseBlocks.megarepairturret, stack(Item.iron, 20), stack(Item.steel, 30)), titaniumshieldwall(defense, DefenseBlocks.titaniumshieldwall, stack(Item.titanium, 2)), shieldgenerator(defense, DefenseBlocks.shieldgenerator, stack(Item.titanium, 10), stack(Item.dirium, 10)), conveyor(distribution, DistributionBlocks.conveyor, stack(Item.stone, 1)), steelconveyor(distribution, DistributionBlocks.steelconveyor, stack(Item.steel, 1)), - poweredconveyor(distribution, DistributionBlocks.poweredconveyor, stack(Item.dirium, 1)), + poweredconveyor(distribution, DistributionBlocks.pulseconveyor, stack(Item.dirium, 1)), router(distribution, DistributionBlocks.router, stack(Item.stone, 2)), junction(distribution, DistributionBlocks.junction, stack(Item.iron, 2)), conduit(distribution, DistributionBlocks.conduit, stack(Item.steel, 1)), + pulseconduit(distribution, DistributionBlocks.pulseconduit, stack(Item.titanium, 1), stack(Item.steel, 1)), liquidrouter(distribution, DistributionBlocks.liquidrouter, stack(Item.steel, 2)), liquidjunction(distribution, DistributionBlocks.liquidjunction, stack(Item.steel, 2)), liquiditemjunction(distribution, DistributionBlocks.liquiditemjunction, stack(Item.steel, 1), stack(Item.iron, 1)), @@ -67,7 +66,11 @@ public enum Recipe{ powerlaserrouter(power, DistributionBlocks.powerlaserrouter, stack(Item.titanium, 10), stack(Item.dirium, 10)), teleporter(power, DistributionBlocks.teleporter, stack(Item.titanium, 10), stack(Item.dirium, 10)), - pump(production, ProductionBlocks.pump, stack(Item.steel, 10)); + healturret(power, DefenseBlocks.repairturret, stack(Item.iron, 30)), + megahealturret(power, DefenseBlocks.megarepairturret, stack(Item.iron, 20), stack(Item.steel, 30)), + + pump(production, ProductionBlocks.pump, stack(Item.steel, 10)), + fluxpump(production, ProductionBlocks.fluxpump, stack(Item.steel, 10), stack(Item.dirium, 5)); public Block result; public ItemStack[] requirements; diff --git a/core/src/io/anuke/mindustry/world/Block.java b/core/src/io/anuke/mindustry/world/Block.java index e22ae3baa1..8bebbbe942 100644 --- a/core/src/io/anuke/mindustry/world/Block.java +++ b/core/src/io/anuke/mindustry/world/Block.java @@ -57,6 +57,8 @@ public class Block{ public Liquid liquidDrop = null; /**multiblock width/height*/ public int width = 1, height = 1; + /**Detailed description of the block. Can be as long as necesary.*/ + public String fullDescription; //TODO show this public Block(String name) { blocks.add(this); diff --git a/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java b/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java index c2bf80382f..f07ce77e46 100644 --- a/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java +++ b/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java @@ -9,7 +9,13 @@ public class DistributionBlocks{ public static final Block conduit = new LiquidBlock("conduit"){{ - + health = 45; + }}, + + pulseconduit = new LiquidBlock("pulseconduit"){{ + liquidCapacity = 16f; + flowfactor = 4.9f; + health = 65; }}, liquidrouter = new LiquidRouter("liquidrouter"){{ @@ -27,7 +33,7 @@ public class DistributionBlocks{ }}, //TODO - poweredconveyor = new Conveyor("poweredconveyor"){{ + pulseconveyor = new Conveyor("poweredconveyor"){{ health = 90; speed = 0.09f; formalName = "pulse conveyor"; diff --git a/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java b/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java index 88b6fd87b7..343cd59c1a 100644 --- a/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java +++ b/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java @@ -42,6 +42,10 @@ public class ProductionBlocks{ }}, + fluxpump = new Pump("fluxpump"){{ + pumpspeed = 3f; + }}, + smelter = new Crafter("smelter"){ { health = 70; @@ -51,7 +55,7 @@ public class ProductionBlocks{ @Override public String description(){ - return "Takes in coal + iron, outputs steel."; + return "Converts coal + iron to steel."; } }, @@ -64,7 +68,7 @@ public class ProductionBlocks{ @Override public String description(){ - return "Takes in steel + titanium, outputs dirium."; + return "Converts steel + titanium to dirium."; } }, @@ -82,7 +86,7 @@ public class ProductionBlocks{ @Override public String description(){ - return "Takes in stone + water, outputs coal."; + return "Converts stone + water to coal."; } }, @@ -101,7 +105,7 @@ public class ProductionBlocks{ @Override public String description(){ - return "Takes in iron + water, outputs titanium."; + return "Converts iron + water to titanium."; } }, @@ -119,7 +123,45 @@ public class ProductionBlocks{ @Override public String description(){ - return "Takes in oil, outputs coal."; + return "Converts oil to coal."; + } + }, + + stoneformer = new LiquidCrafter("stoneformer"){ + { + formalName = "stone former"; + input = Item.iron; + inputAmount = 2; + inputLiquid = Liquid.lava; + liquidAmount = 20f; + liquidCapacity = 21f; + purifyTime = 10; + output = Item.stone; + health = 80; + craftEffect = Fx.purifystone; + } + + @Override + public String description(){ + return "Converts lava to stone."; + } + }, + + lavasmelter = new LiquidCrafter("lavasmelter"){ + { + formalName = "lava smelter"; + inputLiquid = Liquid.lava; + liquidAmount = 40f; + liquidCapacity = 41f; + purifyTime = 25; + output = Item.stone; + health = 80; + craftEffect = Fx.purifystone; + } + + @Override + public String description(){ + return "Converts iron + lava to steel."; } }, @@ -156,7 +198,7 @@ public class ProductionBlocks{ omnidrill = new Drill("omnidrill"){ { - time = 2; + time = 3; formalName = "omnidrill"; } diff --git a/core/src/io/anuke/mindustry/world/blocks/types/LiquidBlock.java b/core/src/io/anuke/mindustry/world/blocks/types/LiquidBlock.java index 4ae078d577..6c7ecee99c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/LiquidBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/LiquidBlock.java @@ -76,7 +76,8 @@ public class LiquidBlock extends Block implements LiquidAcceptor{ if(next != null && next.block() instanceof LiquidAcceptor && entity.liquidAmount > 0.01f){ LiquidAcceptor other = (LiquidAcceptor)next.block(); - float flow = Math.min(other.getLiquidCapacity(next) - other.getLiquid(next) - 0.001f, Math.min(entity.liquidAmount/flowfactor, entity.liquidAmount)); + float flow = Math.min(other.getLiquidCapacity(next) - other.getLiquid(next) - 0.001f, + Math.min(entity.liquidAmount/flowfactor, entity.liquidAmount)); if(flow <= 0f || entity.liquidAmount < flow) return; diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/RepairTurret.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/RepairTurret.java index 5966d93ecb..cd7bee286c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/RepairTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/defense/RepairTurret.java @@ -34,7 +34,6 @@ public class RepairTurret extends Turret{ if(entity.blockTarget.health > entity.blockTarget.health) entity.blockTarget.health = entity.blockTarget.maxhealth; - } } } diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java index 8c498abdff..c08732ddc7 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java @@ -24,8 +24,8 @@ import io.anuke.ucore.util.Angles; import io.anuke.ucore.util.Mathf; public class Turret extends Block{ - public static final int targetInterval = 15; - private static boolean drawDebug = false; + static final int targetInterval = 15; + static boolean drawDebug = false; protected float range = 50f; protected float reload = 10f; @@ -118,7 +118,7 @@ public class Turret extends Block{ if(entity.target != null && entity.target.isDead()) entity.target = null; - if(hasAmmo(tile)){ + if(hasAmmo(tile) || (Vars.debug && Vars.infiniteAmmo)){ if(Timers.get(entity, "target", targetInterval)){ entity.target = (Enemy)Entities.getClosest(tile.worldx(), tile.worldy(), range, e->{ diff --git a/core/src/io/anuke/mindustry/world/blocks/types/production/Pump.java b/core/src/io/anuke/mindustry/world/blocks/types/production/Pump.java index 38ca649891..81660ec064 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/production/Pump.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/production/Pump.java @@ -29,6 +29,15 @@ public class Pump extends LiquidBlock{ @Override public void draw(Tile tile){ Draw.rect(name(), tile.worldx(), tile.worldy()); + + LiquidEntity entity = tile.entity(); + + if(entity.liquid == null) return; + + Draw.color(entity.liquid.color); + Draw.alpha(entity.liquidAmount / liquidCapacity); + Draw.rect("blank", tile.worldx(), tile.worldy(), 2, 2); + Draw.color(); } @Override @@ -47,7 +56,7 @@ public class Pump extends LiquidBlock{ if(tile.floor().liquidDrop != null && Timers.get(tile, "pump", 8) && entity.liquidAmount < liquidCapacity){ entity.liquid = tile.floor().liquidDrop; - entity.liquidAmount += pumpspeed; + entity.liquidAmount += Math.min(pumpspeed, this.liquidCapacity - entity.liquidAmount); } if(Timers.get(tile, "dump", 1)){