diff --git a/TODO.md b/TODO.md index d2b97054e602..66d6ca0aebf6 100644 --- a/TODO.md +++ b/TODO.md @@ -1,7 +1,7 @@ _Keep in mind that this is just a basic outline of planned features, and will be constantly changing!_ ### 3.0 Release -- New tutorial with the power blocks +- [DONE] New tutorial with the power blocks - [DONE] New SFX for specific blocks, especially turrets - [DONE] Block drawing layers. Refactor/remove `Block#drawOver()`, add `Layer` enum. Should fix 'glitchy' lasers and conveyor clipping - [DONE] Balance nuclear reactor, improve effectiveness as they are currently underpowered diff --git a/core/assets/maps/tutorial.png b/core/assets/maps/tutorial.png index 5e4ddfeae57d..88b8a8af0469 100644 Binary files a/core/assets/maps/tutorial.png and b/core/assets/maps/tutorial.png differ diff --git a/core/assets/sounds/shoot.wav b/core/assets/sounds/shoot.wav index df95d03a3c8b..d54fe57302c2 100644 Binary files a/core/assets/sounds/shoot.wav and b/core/assets/sounds/shoot.wav differ diff --git a/core/assets/sounds/shoot_old.wav b/core/assets/sounds/shoot_old.wav new file mode 100644 index 000000000000..df95d03a3c8b Binary files /dev/null and b/core/assets/sounds/shoot_old.wav differ diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 1f20badea714..56ad4c3b64c2 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 0d2cca3b2642..01d77bfba8a6 100644 --- a/core/src/io/anuke/mindustry/core/Tutorial.java +++ b/core/src/io/anuke/mindustry/core/Tutorial.java @@ -158,6 +158,19 @@ public void setDefaultBlocks(int corex, int corey){ world.tile(corex, corey - 2).setBlock(Blocks.air); world.tile(corex, corey - 3).setBlock(Blocks.air); world.tile(corex, corey - 3).setFloor(Blocks.stone); + + world.tile(corex + 1, corey - 7).setFloor(Blocks.iron); + world.tile(corex - 1, corey - 7).setFloor(Blocks.coal); + + int r = 10; + + for(int x = -r; x <= r; x ++){ + for(int y = -r; y <= r; y ++){ + if(world.tile(corex + x, corey + y).block() == Blocks.rock){ + world.tile(corex + x, corey + y).setBlock(Blocks.air); + } + } + } } enum Stage{ @@ -169,7 +182,7 @@ enum Stage{ moveDesktop{ { desktopOnly = true; - text = "To move, use the [orange][[WASD][] keys. Use the [orange]scrollwheel[] to zoom in or out."; + text = "To move, use the [orange][[WASD][] keys. Hold [orange]shift[] to boost. Hold [orange]CTRL[] while using the [orange]scrollwheel[] to zoom in or out."; } }, shoot{ @@ -205,7 +218,7 @@ void onSwitch(){ blockPlaceX = 0; 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][]."; + text = "Use the [orange][[scrollwheel][] to rotate the conveyor to face [orange]forwards[], then place it in the [yellow]marked location[] using the [orange][[left mouse button][]."; } }, placeConveyorAndroid{ @@ -250,6 +263,12 @@ void onSwitch(){ Vars.ui.find("sectionbuttonproduction").fireClick(); } }, + blockInfo{ + { + canBack = true; + text = "If you want to learn more about a block, you can tap the [orange]question mark[] in the top right to read its description."; + } + }, deselectDesktop{ { desktopOnly = true; @@ -436,7 +455,7 @@ void onSwitch(){ pumpDesc{ { canBack = false; - text = "In later waves, you might need to use [yellow]pumps[] to distribute liquids for extractors."; + text = "In later waves, you might need to use [yellow]pumps[] to distribute liquids for generators or extractors."; } }, pumpPlace{ @@ -448,7 +467,7 @@ void onSwitch(){ targetBlock = ProductionBlocks.pump; blockPlaceX = 6; blockPlaceY = -2; - text = "Pumps work similarly to drills, except that they produce liquids instead of items. Try placing a pump on the [yellow]designated water[]."; + text = "Pumps work similarly to drills, except that they produce liquids instead of items. Try placing a pump on the [yellow]designated oil[]."; } void onSwitch(){ @@ -509,59 +528,124 @@ void onSwitch(){ world.tile(blockPlaceX + control.core.x, blockPlaceY + control.core.y).setBlock(Blocks.air); } }, - extractor{ + generator{ { canBack = false; canForward = false; showBlock = true; canPlace = true; - targetBlock = ProductionBlocks.coalpurifier; + targetBlock = ProductionBlocks.combustiongenerator; blockPlaceX = 4; blockPlaceY = 0; - text = "Now, place a [orange]coal extractor[] block at the end of the conduit."; + text = "Now, place a [orange]combustion generator[] block at the end of the conduit."; } void onSwitch(){ world.tile(blockPlaceX + control.core.x, blockPlaceY + control.core.y).setBlock(Blocks.air); - Vars.ui.find("sectionbuttoncrafting").fireClick(); + Vars.ui.find("sectionbuttonpower").fireClick(); Vars.control.addItem(Item.steel, 60); Vars.control.addItem(Item.iron, 60); } }, - extractorExplain{ + generatorExplain{ { canBack = false; - text = "The extractor will now produce [orange]coal[] from the stone and water, then move it to the core."; + text = "This generator will now create [yellow]power[] from the oil."; + } + }, + lasers{ + { + canBack = false; + canForward = false; + showBlock = true; + canPlace = true; + text = "Power is distributed using [yellow]power lasers[]. Rotate and place one here."; + blockPlaceX = 4; + blockPlaceY = 4; + blockRotation = 2; + targetBlock = DistributionBlocks.powerlaser; } void onSwitch(){ - for(int i = -2; i <= 2; i ++){ - world.tile(control.core.x + i + 4, control.core.y + 2).setBlock(ProductionBlocks.stonedrill); - world.tile(control.core.x + i + 4, control.core.y + 2).setFloor(Blocks.stone); - } - - 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); - world.tile(control.core.x + 4, control.core.y + 1).setBlock(DistributionBlocks.conveyor, 3); - world.tile(control.core.x + 5, control.core.y + 1).setBlock(DistributionBlocks.conveyor, 2); - world.tile(control.core.x + 6, control.core.y + 1).setBlock(DistributionBlocks.conveyor, 2); - + Vars.ui.find("sectionbuttonpower").fireClick(); + } + }, + laserExplain{ + { + canBack = false; + text = "The generator will now move power into the laser block. An [yellow]opaque[] beam means that it is currently transmitting power, " + + "and a [yellow]transparent[] beam means it is not."; + } + }, + laserMore{ + { + canBack = false; + text = "You can check how much power a block has by hovering over it and checking the [yellow]yellow bar[] at the top."; + } + }, + healingTurret{ + { + canBack = false; + canForward = false; + showBlock = true; + canPlace = true; + canBack = false; + blockPlaceX = 1; + blockPlaceY = 4; + targetBlock = DefenseBlocks.repairturret; + text = "This laser can be used to power a [lime]repair turret[]. Place one here."; + } + + void onSwitch(){ + Vars.ui.find("sectionbuttonpower").fireClick(); + } + }, + healingTurretExplain{ + { + canBack = false; + text = "As long as it has power, this turret will [lime]repair nearby blocks.[] When playing, make sure you get one in your base as quickly as possible!"; } }, - extractorMore{ + smeltery{ { canBack = false; + canForward = false; + showBlock = true; canPlace = true; - text = "The [orange]smeltery[] and [orange]crucible[] blocks work similarly to extractors, except they accept only items."; + canBack = false; + blockPlaceX = 0; + blockPlaceY = -6; + targetBlock = ProductionBlocks.smelter; + text = "Many blocks require [orange]steel[] to make, which requires a [orange]smelter[] to craft. Place one here."; + } + + void onSwitch(){ + Vars.control.addItem(Item.stone, 40); + Vars.control.addItem(Item.iron, 40); + Vars.ui.find("sectionbuttoncrafting").fireClick(); + + } + }, + smelterySetup{ + { + canBack = false; + text = "This smelter will now produce [orange]steel[] from the input coal and iron."; + } + + void onSwitch(){ + for(int i = 0; i < 4; i ++){ + world.tile(control.core.x, control.core.y - 5 + i).setBlock(DistributionBlocks.conveyor, 1); + } + world.tile(control.core.x+1, control.core.y - 7).setBlock(ProductionBlocks.irondrill); + world.tile(control.core.x-1, control.core.y - 7).setBlock(ProductionBlocks.coaldrill); + + world.tile(control.core.x+1, control.core.y - 6).setBlock(DistributionBlocks.conveyor, 2); + world.tile(control.core.x-1, control.core.y - 6).setBlock(DistributionBlocks.conveyor, 0); } }, end{ { - text = "And that concludes the tutorial!"; + text = "And that concludes the tutorial! Good luck!"; canBack = false; } }; diff --git a/core/src/io/anuke/mindustry/ui/fragments/BlocksFragment.java b/core/src/io/anuke/mindustry/ui/fragments/BlocksFragment.java index 8069e631017f..e6a615347712 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/BlocksFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/BlocksFragment.java @@ -179,7 +179,7 @@ void updateRecipe(){ Table top = new Table(); top.left(); top.add(new Image(Draw.region(recipe.result.name))).size(8*5 * recipe.result.width).units(Unit.dp); - top.add("[orange]"+recipe.result.formalName).padLeft(6f).units(Unit.dp); + top.add("[accent]"+recipe.result.formalName).padLeft(6f).units(Unit.dp); table.add(top).fill().left(); table.row(); table.add(desclabel).width(600).units(Unit.dp); @@ -188,7 +188,7 @@ void updateRecipe(){ d.content().add(pane).grow(); if(statlist.size > 0){ - table.add("[coral][[extra block info]:").padTop(6).padBottom(5).left(); + table.add("[accent]extra block info:").padTop(6).padBottom(5).left(); table.row(); } diff --git a/desktop/.attach_pid16116 b/desktop/.attach_pid16116 new file mode 100644 index 000000000000..e69de29bb2d1