Added mission completion dialog / Bundle fixes
This commit is contained in:
@@ -146,7 +146,6 @@ public class Recipes implements ContentList{
|
||||
new Recipe(liquid, LiquidBlocks.pulseConduit, new ItemStack(Items.titanium, 1), new ItemStack(Items.lead, 1));
|
||||
new Recipe(liquid, LiquidBlocks.phaseConduit, new ItemStack(Items.phasematter, 10), new ItemStack(Items.silicon, 15), new ItemStack(Items.lead, 20), new ItemStack(Items.titanium, 20));
|
||||
|
||||
|
||||
new Recipe(liquid, LiquidBlocks.liquidRouter, new ItemStack(Items.carbide, 4), new ItemStack(Items.lead, 4));
|
||||
new Recipe(liquid, LiquidBlocks.liquidtank, new ItemStack(Items.titanium, 50), new ItemStack(Items.lead, 50), new ItemStack(Items.carbide, 20));
|
||||
new Recipe(liquid, LiquidBlocks.liquidJunction, new ItemStack(Items.carbide, 4), new ItemStack(Items.lead, 4));
|
||||
|
||||
@@ -369,9 +369,7 @@ public class Control extends Module{
|
||||
|
||||
world.sectors().completeSector(world.getSector().x, world.getSector().y);
|
||||
world.sectors().save();
|
||||
if(!headless){
|
||||
ui.showInfoFade("$text.sector.unlocked");
|
||||
}
|
||||
ui.missions.show(world.getSector());
|
||||
}else if(world.getSector().currentMission().isComplete()){
|
||||
//increment completed missions, check next index next frame
|
||||
world.getSector().completedMissions ++;
|
||||
|
||||
@@ -62,6 +62,7 @@ public class UI extends SceneModule{
|
||||
public UnlocksDialog unlocks;
|
||||
public ContentInfoDialog content;
|
||||
public SectorsDialog sectors;
|
||||
public MissionDialog missions;
|
||||
|
||||
private Locale lastLocale;
|
||||
|
||||
@@ -169,6 +170,7 @@ public class UI extends SceneModule{
|
||||
unlocks = new UnlocksDialog();
|
||||
content = new ContentInfoDialog();
|
||||
sectors = new SectorsDialog();
|
||||
missions = new MissionDialog();
|
||||
|
||||
Group group = Core.scene.getRoot();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class WaveMission implements Mission{
|
||||
|
||||
@Override
|
||||
public void display(Table table){
|
||||
|
||||
table.add(Bundles.format("text.mission.wave", target));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
24
core/src/io/anuke/mindustry/ui/dialogs/MissionDialog.java
Normal file
24
core/src/io/anuke/mindustry/ui/dialogs/MissionDialog.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.maps.Sector;
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
|
||||
public class MissionDialog extends FloatingDialog{
|
||||
|
||||
public MissionDialog(){
|
||||
super("$text.mission.complete");
|
||||
setFillParent(false);
|
||||
}
|
||||
|
||||
public void show(Sector sector){
|
||||
buttons().clear();
|
||||
content().clear();
|
||||
|
||||
addCloseButton();
|
||||
|
||||
buttons().addButton("$text.quit", () -> Vars.ui.paused.runExitSave()).size(190f, 64f);
|
||||
content().add(Bundles.format("text.mission.complete.body", sector.x, sector.y)).pad(10);
|
||||
show();
|
||||
}
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public class PausedDialog extends FloatingDialog{
|
||||
}
|
||||
}
|
||||
|
||||
private void runExitSave(){
|
||||
public void runExitSave(){
|
||||
if(control.getSaves().getCurrent() == null ||
|
||||
!control.getSaves().getCurrent().isAutosave()){
|
||||
state.set(State.menu);
|
||||
|
||||
Reference in New Issue
Block a user