Broke tutorial
This commit is contained in:
@@ -20,74 +20,54 @@ public class TutorialSector{
|
||||
Array<Mission> missions = Array.with(
|
||||
new ItemMission(Items.copper, 60).setMessage("$tutorial.begin"),
|
||||
|
||||
new BlockLocMission(ProductionBlocks.mechanicalDrill, 55, 62).setMessage("$tutorial.drill"),
|
||||
new BlockMission(ProductionBlocks.mechanicalDrill).setMessage("$tutorial.drill"),
|
||||
|
||||
new BlockLocMission(DistributionBlocks.conveyor, 57, 62, 0).setShowComplete(false).setMessage("$tutorial.conveyor"),
|
||||
new BlockLocMission(DistributionBlocks.conveyor, 58, 62, 0).setShowComplete(false),
|
||||
new BlockLocMission(DistributionBlocks.conveyor, 59, 62, 0).setShowComplete(false),
|
||||
new BlockLocMission(DistributionBlocks.conveyor, 60, 62, 3).setShowComplete(false),
|
||||
new BlockMission(DistributionBlocks.conveyor).setShowComplete(false).setMessage("$tutorial.conveyor"),
|
||||
|
||||
new ItemMission(Items.copper, 100).setMessage("$tutorial.morecopper"),
|
||||
|
||||
new BlockLocMission(TurretBlocks.duo, 56, 59).setMessage("$tutorial.turret"),
|
||||
new BlockLocMission(ProductionBlocks.mechanicalDrill, 55, 60).setMessage("$tutorial.drillturret"),
|
||||
new BlockMission(TurretBlocks.duo).setMessage("$tutorial.turret"),
|
||||
//TODO fill turret with items mission
|
||||
//new BlockMission(ProductionBlocks.mechanicalDrill).setMessage("$tutorial.drillturret"),
|
||||
|
||||
new WaveMission(2).setMessage("$tutorial.waves"),
|
||||
|
||||
new ItemMission(Items.lead, 150).setMessage("$tutorial.lead"),
|
||||
new ItemMission(Items.copper, 250).setMessage("$tutorial.morecopper"),
|
||||
|
||||
new BlockLocMission(CraftingBlocks.smelter, 58, 69).setMessage("$tutorial.smelter"),
|
||||
new BlockMission(CraftingBlocks.smelter).setMessage("$tutorial.smelter"),
|
||||
|
||||
//drills for smelter
|
||||
new BlockLocMission(ProductionBlocks.mechanicalDrill, 62, 86),
|
||||
new BlockLocMission(ProductionBlocks.mechanicalDrill, 58, 89),
|
||||
new BlockLocMission(ProductionBlocks.mechanicalDrill, 54, 68),
|
||||
|
||||
//conveyors for smelter
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 58, 88, 58, 70, 3),
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 61, 86, 61, 70, 3),
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 61, 69, 59, 69, 2),
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 56, 69, 57, 69, 0),
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 58, 68, 58, 63, 3),
|
||||
new BlockLocMission(DistributionBlocks.junction, 58, 62, 0),
|
||||
new BlockLocMission(DistributionBlocks.conveyor, 58, 61, 0),
|
||||
new BlockMission(ProductionBlocks.mechanicalDrill),
|
||||
new BlockMission(ProductionBlocks.mechanicalDrill),
|
||||
new BlockMission(ProductionBlocks.mechanicalDrill),
|
||||
|
||||
new ItemMission(Items.densealloy, 20).setMessage("$tutorial.densealloy"),
|
||||
|
||||
new MarkerBlockMission(CraftingBlocks.siliconsmelter, 54, 52).setMessage("$tutorial.siliconsmelter"),
|
||||
new MarkerBlockMission(CraftingBlocks.siliconsmelter).setMessage("$tutorial.siliconsmelter"),
|
||||
|
||||
//coal line
|
||||
new BlockLocMission(ProductionBlocks.mechanicalDrill, 47, 52).setMessage("$tutorial.silicondrill"),
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 49, 52, 53, 52, 0),
|
||||
new BlockMission(ProductionBlocks.mechanicalDrill).setMessage("$tutorial.silicondrill"),
|
||||
|
||||
//sand line
|
||||
new BlockLocMission(ProductionBlocks.mechanicalDrill, 53, 49),
|
||||
new BlockLocMission(ProductionBlocks.mechanicalDrill, 56, 49),
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 55, 50, 55, 51, 1),
|
||||
new BlockMission(ProductionBlocks.mechanicalDrill),
|
||||
new BlockMission(ProductionBlocks.mechanicalDrill),
|
||||
|
||||
//silicon line
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 56, 53, 59, 53, 0),
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 60, 53, 60, 58, 1),
|
||||
|
||||
new BlockLocMission(PowerBlocks.combustionGenerator, 49, 54).setMessage("$tutorial.generator"),
|
||||
new BlockLocMission(ProductionBlocks.mechanicalDrill, 47, 54).setMessage("$tutorial.generatordrill"),
|
||||
new BlockLocMission(PowerBlocks.powerNode, 52, 54).setMessage("$tutorial.node"),
|
||||
new BlockMission(PowerBlocks.combustionGenerator).setMessage("$tutorial.generator"),
|
||||
new BlockMission(ProductionBlocks.mechanicalDrill).setMessage("$tutorial.generatordrill"),
|
||||
new BlockMission(PowerBlocks.powerNode).setMessage("$tutorial.node"),
|
||||
//TODO fix positions
|
||||
new ConditionMission(Bundles.get("text.mission.linknode"), () -> world.tile(54, 52).entity != null && world.tile(54, 52).entity.power != null && world.tile(54, 52).entity.power.amount >= 0.01f)
|
||||
.setMessage("$tutorial.nodelink"),
|
||||
|
||||
new ItemMission(Items.silicon, 70).setMessage("$tutorial.silicon"),
|
||||
|
||||
new BlockLocMission(UnitBlocks.daggerFactory, 64, 59).setMessage("$tutorial.daggerfactory"),
|
||||
|
||||
//silicon lines for dagger factory
|
||||
new BlockLocMission(DistributionBlocks.router, 60, 57).setMessage("$tutorial.router"),
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 61, 57, 63, 57, 0),
|
||||
new LineBlockMission(DistributionBlocks.conveyor, 64, 57, 64, 58, 1),
|
||||
new BlockMission(UnitBlocks.daggerFactory).setMessage("$tutorial.daggerfactory"),
|
||||
|
||||
//power for dagger factory
|
||||
new BlockLocMission(PowerBlocks.powerNode, 57, 54),
|
||||
new BlockLocMission(PowerBlocks.powerNode, 62, 54),
|
||||
new BlockMission(PowerBlocks.powerNode),
|
||||
new BlockMission(PowerBlocks.powerNode),
|
||||
|
||||
new UnitMission(UnitTypes.dagger).setMessage("$tutorial.dagger"),
|
||||
new ActionMission(TutorialSector::generateBase),
|
||||
@@ -121,9 +101,9 @@ public class TutorialSector{
|
||||
state.teams.get(waveTeam).cores.add(world.tile(x, y));
|
||||
}
|
||||
|
||||
private static class MarkerBlockMission extends BlockLocMission{
|
||||
public MarkerBlockMission(Block block, int x, int y){
|
||||
super(block, x, y);
|
||||
private static class MarkerBlockMission extends BlockMission{
|
||||
public MarkerBlockMission(Block block){
|
||||
super(block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public abstract class Mission{
|
||||
|
||||
public void onComplete(){
|
||||
if(showComplete && !headless){
|
||||
threads.runGraphics(() -> ui.hudfrag.showText("[LIGHT_GRAY]"+menuDisplayString() + ":\n" + Bundles.get("text.mission.complete")));
|
||||
threads.runGraphics(() -> ui.hudfrag.showToast("[LIGHT_GRAY]"+menuDisplayString() + ":\n" + Bundles.get("text.mission.complete")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import io.anuke.ucore.scene.Group;
|
||||
import io.anuke.ucore.scene.event.InputEvent;
|
||||
import io.anuke.ucore.scene.event.InputListener;
|
||||
import io.anuke.ucore.scene.event.Touchable;
|
||||
import io.anuke.ucore.scene.ui.layout.Cell;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
import io.anuke.ucore.scene.utils.Cursors;
|
||||
@@ -36,7 +37,7 @@ public class SectorsDialog extends FloatingDialog{
|
||||
table = new Table(){
|
||||
@Override
|
||||
public float getPrefWidth(){
|
||||
return sectorSize*2f;
|
||||
return Unit.dp.scl(sectorSize*2f);
|
||||
}
|
||||
};
|
||||
table.visible(() -> selected != null);
|
||||
@@ -97,7 +98,7 @@ public class SectorsDialog extends FloatingDialog{
|
||||
}
|
||||
|
||||
table.table(t -> {
|
||||
t.addImageTextButton(sector.hasSave() ? "$text.sector.resume" : "$text.sector.deploy", "icon-play", 10*3, () -> {
|
||||
Cell<?> cell = t.addImageTextButton(sector.hasSave() ? "$text.sector.resume" : "$text.sector.deploy", "icon-play", 10*3, () -> {
|
||||
hide();
|
||||
Vars.ui.loadLogic(() -> world.sectors.playSector(selected));
|
||||
}).height(60f).growX();
|
||||
@@ -110,6 +111,7 @@ public class SectorsDialog extends FloatingDialog{
|
||||
selectSector(selected);
|
||||
})
|
||||
).width(sectorSize).height(60f);
|
||||
cell.width(sectorSize);
|
||||
}
|
||||
}).pad(-5).growX().padTop(0);
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ public class HudFragment extends Fragment{
|
||||
blockfrag.build(Core.scene.getRoot());
|
||||
}
|
||||
|
||||
public void showText(String text){
|
||||
public void showToast(String text){
|
||||
Table table = new Table("button");
|
||||
table.update(() -> {
|
||||
if(state.is(State.menu)){
|
||||
@@ -219,9 +219,7 @@ public class HudFragment extends Fragment{
|
||||
Actions.run(() -> container.actions(Actions.translateBy(0, table.getPrefHeight(), 1f, Interpolation.fade), Actions.removeActor())));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show unlock notification for a new recipe.
|
||||
*/
|
||||
/**Show unlock notification for a new recipe.*/
|
||||
public void showUnlock(Recipe recipe){
|
||||
blockfrag.rebuild();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user