Added mission completion dialog / Bundle fixes

This commit is contained in:
Anuken
2018-08-01 18:31:44 -04:00
parent ae90db50fe
commit af004da699
10 changed files with 37 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 B

After

Width:  |  Height:  |  Size: 561 B

View File

@ -54,10 +54,11 @@ text.sector=Sector: [LIGHT_GRAY]{0}
text.sector.time=Time: [LIGHT_GRAY]{0}
text.sector.deploy=Deploy
text.sector.resume=Resume
text.sector.unlocked=Sector completed!
text.sector.locked=[scarlet][[Incomplete]
text.sector.unexplored=[accent][[Unexplored]
text.mission=Mission:[LIGHT_GRAY] {0}
text.mission.complete=Mission complete!
text.mission.complete.body=Sector {0},{1} has been conquered.
text.mission.wave=Survive [accent]{0}[] waves.
text.mission.battle=Destroy the enemy base.
text.mission.resource=Obtain {0} x{1}
@ -473,9 +474,9 @@ block.carbide-drill.name=Carbide Drill
block.laser-drill.name=Laser Drill
block.water-extractor.name=Water Extractor
block.cultivator.name=Cultivator
block.dart-ship-factory.name=Dart Ship Reonstructor
block.dart-ship-factory.name=Dart Ship Reconstructor
block.delta-mech-factory.name=Delta Mech Reconstructor
block.dronefactory.name=Drone Factory
block.javelin-ship-factory.name=Javelin Ship Reconstructor
block.repairpoint.name=Repair Point
block.resupplypoint.name=Resupply Point
block.conduit.name=Conduit
@ -506,9 +507,10 @@ block.solidifer.name=Solidifer
block.solar-panel.name=Solar Panel
block.solar-panel-large.name=Large Solar Panel
block.oil-extractor.name=Oil Extractor
block.javelin-ship-factory.name=Javelin Ship factory
block.drone-factory.name=Drone Factory
block.fabricator-factory.name=Fabricator Factory
block.drone-pad.name=Drone Pad
block.fabricator-pad.name=Fabricator Pad
block.interceptor-pad.name=Interceptor Pad
block.monsoon-pad.name=Monsoon Pad
block.repair-point.name=Repair Point
block.resupply-point.name=Resupply Point
block.pulse-conduit.name=Pulse Conduit
@ -519,7 +521,6 @@ block.liquid-junction.name=Liquid Junction
block.bridge-conduit.name=Bridge Conduit
block.rotary-pump.name=Rotary Pump
block.nuclear-reactor.name=Nuclear Reactor
block.interceptor-factory.name=Interceptor Factory
block.command-center.name=Command Center
block.mass-driver.name=Mass Driver
block.blast-drill.name=Blast Drill

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

View File

@ -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));

View File

@ -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 ++;

View File

@ -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();

View File

@ -15,7 +15,7 @@ public class WaveMission implements Mission{
@Override
public void display(Table table){
table.add(Bundles.format("text.mission.wave", target));
}
@Override

View 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();
}
}

View File

@ -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);