diff --git a/core/assets-raw/sprites/blocks/powerlasercorner.png b/core/assets-raw/sprites/blocks/powerlasercorner.png new file mode 100644 index 0000000000..52c2858c7d Binary files /dev/null and b/core/assets-raw/sprites/blocks/powerlasercorner.png differ diff --git a/core/assets/sprites/sprites.atlas b/core/assets/sprites/sprites.atlas index 8d713650bc..ced9b2c0ee 100644 --- a/core/assets/sprites/sprites.atlas +++ b/core/assets/sprites/sprites.atlas @@ -718,41 +718,48 @@ blocks/powerlaser orig: 8, 8 offset: 0, 0 index: -1 -blocks/powerlaserrouter +blocks/powerlasercorner rotate: false xy: 315, 143 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/pulseconduit +blocks/powerlaserrouter rotate: false xy: 325, 143 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/pulseconduitbottom +blocks/pulseconduit rotate: false xy: 314, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/pulseconduittop +blocks/pulseconduitbottom rotate: false xy: 314, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -blocks/pump +blocks/pulseconduittop rotate: false xy: 324, 133 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 +blocks/pump + rotate: false + xy: 314, 113 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 blocks/repairturret rotate: false xy: 437, 243 @@ -762,70 +769,70 @@ blocks/repairturret index: -1 blocks/rock1 rotate: false - xy: 324, 123 + xy: 314, 103 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rock2 rotate: false - xy: 314, 103 + xy: 324, 113 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/router rotate: false - xy: 324, 113 + xy: 314, 93 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/rtgenerator rotate: false - xy: 314, 93 + xy: 324, 103 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand1 rotate: false - xy: 324, 103 + xy: 314, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand2 rotate: false - xy: 314, 83 + xy: 324, 93 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sand3 rotate: false - xy: 324, 93 + xy: 314, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock1 rotate: false - xy: 314, 73 + xy: 324, 83 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock2 rotate: false - xy: 324, 83 + xy: 314, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/sandblock3 rotate: false - xy: 314, 63 + xy: 324, 73 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -846,7 +853,7 @@ blocks/shadow index: -1 blocks/shieldgenerator rotate: false - xy: 314, 53 + xy: 324, 63 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -860,21 +867,21 @@ blocks/shotgunturret index: -1 blocks/shrub rotate: false - xy: 324, 53 + xy: 314, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/shrubshadow rotate: false - xy: 314, 33 + xy: 324, 43 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/smelter rotate: false - xy: 324, 43 + xy: 314, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -888,42 +895,42 @@ blocks/sniperturret index: -1 blocks/snow1 rotate: false - xy: 314, 23 + xy: 324, 33 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snow2 rotate: false - xy: 324, 33 + xy: 314, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snow3 rotate: false - xy: 314, 13 + xy: 324, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock1 rotate: false - xy: 324, 23 + xy: 324, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock2 rotate: false - xy: 324, 13 + xy: 314, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/snowblock3 rotate: false - xy: 314, 3 + xy: 324, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -937,28 +944,28 @@ blocks/snowedge index: -1 blocks/sorter rotate: false - xy: 324, 3 + xy: 411, 217 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelconveyor rotate: false - xy: 411, 217 + xy: 408, 207 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelconveyormove rotate: false - xy: 408, 207 + xy: 408, 197 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/steelwall rotate: false - xy: 408, 197 + xy: 421, 217 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -972,7 +979,7 @@ blocks/steelwall-large index: -1 blocks/steelwall-large-icon rotate: false - xy: 421, 217 + xy: 431, 219 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -986,84 +993,84 @@ blocks/stone index: -1 blocks/stone1 rotate: false - xy: 431, 219 + xy: 418, 207 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone2 rotate: false - xy: 418, 207 + xy: 418, 197 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stone3 rotate: false - xy: 418, 197 + xy: 441, 213 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock-edge-0 rotate: false - xy: 441, 203 + xy: 365, 198 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock-edge-1 rotate: false - xy: 365, 198 + xy: 365, 188 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock-edge-2 rotate: false - xy: 365, 188 + xy: 481, 325 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock-edge-3 rotate: false - xy: 481, 325 + xy: 481, 315 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock-smooth1 rotate: false - xy: 481, 315 + xy: 481, 305 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock1 rotate: false - xy: 441, 213 + xy: 431, 209 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock2 rotate: false - xy: 431, 209 + xy: 428, 199 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stoneblock3 rotate: false - xy: 428, 199 + xy: 441, 203 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stonedrill rotate: false - xy: 481, 305 + xy: 479, 295 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1077,35 +1084,35 @@ blocks/stoneedge index: -1 blocks/stoneformer rotate: false - xy: 479, 295 + xy: 479, 285 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/stonewall rotate: false - xy: 479, 285 + xy: 479, 275 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/teleporter rotate: false - xy: 479, 275 + xy: 479, 265 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/teleporter-top rotate: false - xy: 479, 265 + xy: 479, 255 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/thermalgenerator rotate: false - xy: 479, 255 + xy: 479, 245 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1126,49 +1133,49 @@ blocks/titancannon-icon index: -1 blocks/titanium1 rotate: false - xy: 479, 245 + xy: 491, 329 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titanium2 rotate: false - xy: 491, 329 + xy: 491, 319 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titanium3 rotate: false - xy: 491, 319 + xy: 491, 309 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumdrill rotate: false - xy: 491, 309 + xy: 501, 329 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumpurifier rotate: false - xy: 501, 329 + xy: 501, 319 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumshieldwall rotate: false - xy: 501, 319 + xy: 501, 309 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/titaniumwall rotate: false - xy: 501, 309 + xy: 491, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1182,7 +1189,7 @@ blocks/titaniumwall-large index: -1 blocks/titaniumwall-large-icon rotate: false - xy: 491, 299 + xy: 501, 299 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1196,35 +1203,35 @@ blocks/turret index: -1 blocks/uranium1 rotate: false - xy: 489, 279 + xy: 499, 289 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uranium2 rotate: false - xy: 499, 289 + xy: 489, 269 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uranium3 rotate: false - xy: 489, 269 + xy: 499, 279 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/uraniumdrill rotate: false - xy: 499, 279 + xy: 489, 259 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 blocks/water rotate: false - xy: 489, 259 + xy: 499, 269 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -1588,28 +1595,28 @@ mechs/mech-standard index: -1 shell rotate: false - xy: 324, 73 + xy: 314, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot rotate: false - xy: 324, 63 + xy: 314, 43 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shot-long rotate: false - xy: 314, 43 + xy: 324, 53 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 titanshell rotate: false - xy: 501, 299 + xy: 489, 289 size: 8, 8 orig: 8, 8 offset: 0, 0 @@ -2147,14 +2154,14 @@ weapons/multigun index: -1 weapons/railgun rotate: false - xy: 314, 113 + xy: 324, 123 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 weapons/triblaster rotate: false - xy: 489, 289 + xy: 489, 279 size: 8, 8 orig: 8, 8 offset: 0, 0 diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 5238973934..adf7a96486 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/core/Tutorial.java b/core/src/io/anuke/mindustry/core/Tutorial.java index b193a15815..0d2cca3b26 100644 --- a/core/src/io/anuke/mindustry/core/Tutorial.java +++ b/core/src/io/anuke/mindustry/core/Tutorial.java @@ -155,9 +155,9 @@ public class Tutorial{ } public void setDefaultBlocks(int corex, int corey){ - world.tile(corex, corey - 1).setBlock(Blocks.air); world.tile(corex, corey - 2).setBlock(Blocks.air); - world.tile(corex, corey - 2).setFloor(Blocks.stone); + world.tile(corex, corey - 3).setBlock(Blocks.air); + world.tile(corex, corey - 3).setFloor(Blocks.stone); } enum Stage{ @@ -203,7 +203,7 @@ public class Tutorial{ canForward = false; blockRotation = 1; blockPlaceX = 0; - blockPlaceY = -1; + blockPlaceY = -2; targetBlock = DistributionBlocks.conveyor; text = "Use [orange][[R][] to rotate the conveyor to face [orange]forwards[], then place it in the [yellow]marked location[] using the [orange][[left mouse button][]."; } @@ -216,7 +216,7 @@ public class Tutorial{ canForward = false; blockRotation = 1; blockPlaceX = 0; - blockPlaceY = -1; + blockPlaceY = -2; targetBlock = DistributionBlocks.conveyor; text = "Use the [orange][[rotate button][] to rotate the conveyor to face [orange]forwards[], drag it into position with one finger, then place it in the [yellow]marked location[] using the [orange][[checkmark][]."; } @@ -241,7 +241,7 @@ public class Tutorial{ showBlock = true; canForward = false; blockPlaceX = 0; - blockPlaceY = -2; + blockPlaceY = -3; targetBlock = ProductionBlocks.stonedrill; text = "Now, select and place a [yellow]stone drill[] at the marked location."; } @@ -292,11 +292,12 @@ public class Tutorial{ void onSwitch(){ for(int flip : new int[]{1, -1}){ - world.tile(control.core.x + flip, control.core.y - 1).setBlock(DistributionBlocks.conveyor, 2 * flip); - world.tile(control.core.x + flip*2, control.core.y - 1).setBlock(DistributionBlocks.conveyor, 2 * flip); - world.tile(control.core.x + flip*2, control.core.y - 2).setBlock(DistributionBlocks.conveyor, 1); - world.tile(control.core.x + flip*2, control.core.y - 3).setFloor(Blocks.stone); - world.tile(control.core.x + flip*2, control.core.y - 3).setBlock(ProductionBlocks.stonedrill); + world.tile(control.core.x + flip, control.core.y - 2).setBlock(DistributionBlocks.conveyor, 2 * flip); + world.tile(control.core.x + flip*2, control.core.y - 2).setBlock(DistributionBlocks.conveyor, 2 * flip); + world.tile(control.core.x + flip*2, control.core.y - 3).setBlock(DistributionBlocks.conveyor, 2 * flip); + world.tile(control.core.x + flip*2, control.core.y - 3).setBlock(DistributionBlocks.conveyor, 1); + world.tile(control.core.x + flip*2, control.core.y - 4).setFloor(Blocks.stone); + world.tile(control.core.x + flip*2, control.core.y - 4).setBlock(ProductionBlocks.stonedrill); } } @@ -308,23 +309,24 @@ public class Tutorial{ showBlock = true; targetBlock = Blocks.air; blockPlaceX = 2; - blockPlaceY = -1; + blockPlaceY = -2; text = !Vars.android ? "You can delete blocks by holding the [orange]right mouse button[] on the block you want to delete. Try deleting this conveyor.": "You can delete blocks by [orange]tapping and holding[] on the block you want to delete. Try deleting this conveyor."; } }, + /* deleteBlock2{ { canBack = false; canForward = false; showBlock = true; targetBlock = Blocks.air; - blockPlaceX = 1; - blockPlaceY = -1; + blockPlaceX = -2; + blockPlaceY = -2; text = "Try deleting this other conveyor too."; } - }, + },*/ placeTurret{ { canBack = false; @@ -333,12 +335,12 @@ public class Tutorial{ canPlace = true; targetBlock = WeaponBlocks.turret; blockPlaceX = 2; - blockPlaceY = -1; + blockPlaceY = 2; text = "Now, select and place a [yellow]turret[] at the [yellow]marked location[]."; } void onSwitch(){ - Vars.ui.find("sectionbuttondefense").fireClick(); + Vars.ui.find("sectionbuttonweapon").fireClick(); } }, placedTurretAmmo{ @@ -349,6 +351,9 @@ public class Tutorial{ } void onSwitch(){ + for(int i = 0; i < 4; i ++){ + world.tile(control.core.x + 2, control.core.y - 2 + i).setBlock(DistributionBlocks.conveyor, 1); + } Vars.player.recipe = null; } }, @@ -518,7 +523,7 @@ public class Tutorial{ void onSwitch(){ world.tile(blockPlaceX + control.core.x, blockPlaceY + control.core.y).setBlock(Blocks.air); - Vars.ui.find("sectionbuttonproduction").fireClick(); + Vars.ui.find("sectionbuttoncrafting").fireClick(); Vars.control.addItem(Item.steel, 60); Vars.control.addItem(Item.iron, 60); } @@ -535,9 +540,9 @@ public class Tutorial{ world.tile(control.core.x + i + 4, control.core.y + 2).setFloor(Blocks.stone); } - for(int i = 0; i < 3; i ++){ - world.tile(control.core.x + 4 - 1 - i, control.core.y).setBlock(DistributionBlocks.conveyor, 2); - } + world.tile(control.core.x + 3, control.core.y).setBlock(DistributionBlocks.conveyor, 2); + + world.tile(control.core.x + 2, control.core.y).setBlock(DistributionBlocks.junction, 2); world.tile(control.core.x + 2, control.core.y + 1).setBlock(DistributionBlocks.conveyor, 0); world.tile(control.core.x + 3, control.core.y + 1).setBlock(DistributionBlocks.conveyor, 0); diff --git a/core/src/io/anuke/mindustry/entities/enemies/Enemy.java b/core/src/io/anuke/mindustry/entities/enemies/Enemy.java index 50ac0286b1..710f9e9152 100644 --- a/core/src/io/anuke/mindustry/entities/enemies/Enemy.java +++ b/core/src/io/anuke/mindustry/entities/enemies/Enemy.java @@ -124,7 +124,7 @@ public class Enemy extends DestructibleEntity{ void updateShooting(){ if(Timers.get(this, "reload", reload * Vars.multiplier)){ shoot(bullet); - Effects.sound(shootsound, this); + if(shootsound != null) Effects.sound(shootsound, this); } } diff --git a/core/src/io/anuke/mindustry/entities/enemies/TargetEnemy.java b/core/src/io/anuke/mindustry/entities/enemies/TargetEnemy.java index 5ec216e001..609d6e0f83 100644 --- a/core/src/io/anuke/mindustry/entities/enemies/TargetEnemy.java +++ b/core/src/io/anuke/mindustry/entities/enemies/TargetEnemy.java @@ -6,12 +6,14 @@ import io.anuke.mindustry.Vars; import io.anuke.mindustry.entities.BulletType; import io.anuke.ucore.core.Draw; import io.anuke.ucore.core.Timers; +import io.anuke.ucore.util.Mathf; public class TargetEnemy extends Enemy{ public TargetEnemy(){ speed = 0f; - maxhealth = 10; + maxhealth = 25; + shootsound = null; } @Override @@ -37,7 +39,7 @@ public class TargetEnemy extends Enemy{ Draw.color(Color.YELLOW); if(Vars.control.getTutorial().showTarget()){ - Draw.spikes(x, y, 11f, 4f, 8, Timers.time()); + Draw.spikes(x, y, 11f + Mathf.sin(Timers.time(), 7f, 1f), 4f, 8, Timers.time()); } Draw.color(); diff --git a/core/src/io/anuke/mindustry/resource/Recipe.java b/core/src/io/anuke/mindustry/resource/Recipe.java index d1307dcc3a..f1399e9ab2 100644 --- a/core/src/io/anuke/mindustry/resource/Recipe.java +++ b/core/src/io/anuke/mindustry/resource/Recipe.java @@ -68,6 +68,7 @@ public enum Recipe{ nuclearreactor(power, ProductionBlocks.nuclearReactor, stack(Item.titanium, 40), stack(Item.dirium, 40), stack(Item.steel, 50)), powerbooster(power, DistributionBlocks.powerbooster, stack(Item.steel, 8), stack(Item.iron, 8)), powerlaser(power, DistributionBlocks.powerlaser, stack(Item.steel, 3), stack(Item.iron, 3)), + powerlasercorner(power, DistributionBlocks.powerlasercorner, stack(Item.steel, 4), stack(Item.iron, 4)), powerlaserrouter(power, DistributionBlocks.powerlaserrouter, stack(Item.steel, 5), stack(Item.iron, 5)), shieldgenerator(power, DefenseBlocks.shieldgenerator, stack(Item.titanium, 30), stack(Item.dirium, 40)), diff --git a/core/src/io/anuke/mindustry/world/World.java b/core/src/io/anuke/mindustry/world/World.java index 35c96e8692..0c85042c11 100644 --- a/core/src/io/anuke/mindustry/world/World.java +++ b/core/src/io/anuke/mindustry/world/World.java @@ -286,7 +286,7 @@ public class World extends Module{ if(tile == null) return false; - if(type.isMultiblock() && Vars.control.getTutorial().active() && + if(!type.isMultiblock() && Vars.control.getTutorial().active() && Vars.control.getTutorial().showBlock()){ GridPoint2 point = Vars.control.getTutorial().getPlacePoint(); diff --git a/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java b/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java index a864a1f224..fb1c04b26a 100644 --- a/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java +++ b/core/src/io/anuke/mindustry/world/blocks/DistributionBlocks.java @@ -92,6 +92,13 @@ public class DistributionBlocks{ fullDescription = "Laser that distributes power to three directions at once. " + "Useful in situations where it is required to power multiple blocks from one generator."; }}, + powerlasercorner = new PowerLaserRouter("powerlasercorner"){{ + laserDirections = 2; + formalName = "laser corner"; + description = "Splits input power into 2 lasers."; + fullDescription = "Laser that distributes power to two directions at once. " + + "Useful in situations where it is required to power multiple blocks from one generator, and a normal router is imprecise."; + }}, teleporter = new Teleporter("teleporter"){{ description = "[interact]Tap block to config[]\nTeleports items to others of the same color."; fullDescription = "Advanced item transport block. Teleporters input items to other teleporters of the same color." diff --git a/core/src/io/anuke/mindustry/world/blocks/WeaponBlocks.java b/core/src/io/anuke/mindustry/world/blocks/WeaponBlocks.java index fdba3d7e5d..c0ad67eabf 100644 --- a/core/src/io/anuke/mindustry/world/blocks/WeaponBlocks.java +++ b/core/src/io/anuke/mindustry/world/blocks/WeaponBlocks.java @@ -26,6 +26,7 @@ public class WeaponBlocks{ range = 52; reload = 15f; bullet = BulletType.stone; + health = 50; ammo = Item.stone; fullDescription = "A basic, cheap turret. Uses stone for ammo. Has slightly more range than the double-turret."; } @@ -38,6 +39,7 @@ public class WeaponBlocks{ reload = 13f; bullet = BulletType.stone; ammo = Item.stone; + health = 55; health = 50; fullDescription = "A slightly more powerful version of the turret. Uses stone for ammo. Does significantly more damage, but has a lower range. Shoots two bullets."; } diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/LaserTurret.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/LaserTurret.java index 251382ba0c..e21b76ee12 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/LaserTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/defense/LaserTurret.java @@ -22,6 +22,7 @@ public class LaserTurret extends PowerTurret{ public LaserTurret(String name) { super(name); + shootsound = null; } @Override diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/PowerTurret.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/PowerTurret.java index c78702388b..72c578a3ea 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/PowerTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/defense/PowerTurret.java @@ -33,6 +33,12 @@ public class PowerTurret extends Turret implements PowerAcceptor{ list.add("[powerinfo]Power/shot: " + Strings.toFixed(powerUsed, 1)); } + @Override + public void postInit(){ + super.postInit(); + description += "\n[powerinfo]Power/shot: " + Strings.toFixed(powerUsed, 1); + } + @Override public void drawPixelOverlay(Tile tile){ Vector2 offset = getPlaceOffset(); 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 745fd289d3..e63681da52 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 @@ -158,7 +158,7 @@ public class Turret extends Block{ float reload = Vars.multiplier*this.reload; if(Angles.angleDist(entity.rotation, targetRot) < shootCone && Timers.get(tile, "reload", reload)){ - Effects.sound(shootsound, entity); + if(shootsound != null) Effects.sound(shootsound, entity); shoot(tile); consumeAmmo(tile); entity.ammo --; diff --git a/core/src/io/anuke/mindustry/world/blocks/types/distribution/LiquidItemJunction.java b/core/src/io/anuke/mindustry/world/blocks/types/distribution/LiquidItemJunction.java index b3f5ea09e9..5a04f45f26 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/distribution/LiquidItemJunction.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/distribution/LiquidItemJunction.java @@ -33,7 +33,7 @@ public class LiquidItemJunction extends LiquidBlock{ int dir = source.relativeTo(dest.x, dest.y); dir = (dir+4)%4; - if(dir % 2 == 0) return false; + if(dir+dest.getRotation() % 2 == 1) return false; Tile to = dest.getNearby()[dir]; return to != null && to.block() != this && to.block() instanceof LiquidBlock && @@ -56,7 +56,7 @@ public class LiquidItemJunction extends LiquidBlock{ public boolean acceptItem(Item item, Tile dest, Tile source){ int dir = source.relativeTo(dest.x, dest.y); - if(dir % 2 == 1) return false; + if((dir+dest.getRotation()) % 2 == 0) return false; Tile to = dest.getNearby()[dir]; return to != null && to.block().acceptItem(item, to, dest); diff --git a/core/src/io/anuke/mindustry/world/blocks/types/production/LiquidPowerGenerator.java b/core/src/io/anuke/mindustry/world/blocks/types/production/LiquidPowerGenerator.java index 4c8ae97ca4..1a05dcc7bd 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/production/LiquidPowerGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/production/LiquidPowerGenerator.java @@ -19,7 +19,7 @@ import io.anuke.ucore.core.Timers; import io.anuke.ucore.util.Strings; public class LiquidPowerGenerator extends Generator implements LiquidAcceptor{ - public int generateTime = 5; + public int generateTime = 15; public Liquid generateLiquid; /**Power to generate per generateInput.*/ public float generatePower = 1f; diff --git a/desktop/mindustry-saves/0.mins b/desktop/mindustry-saves/0.mins index bffadbd249..1913c7f072 100644 Binary files a/desktop/mindustry-saves/0.mins and b/desktop/mindustry-saves/0.mins differ diff --git a/desktop/mindustry-saves/5.mins b/desktop/mindustry-saves/5.mins new file mode 100644 index 0000000000..96ded9333d Binary files /dev/null and b/desktop/mindustry-saves/5.mins differ