Changed placement controls / Fixed complete sectors not resetting

This commit is contained in:
Anuken
2018-10-17 17:28:24 -04:00
parent fdffa77bc5
commit f530c9514f
6 changed files with 10 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ text.sector.unexplored=[accent][[Unexplored]
text.mission=任务[LIGHT_GRAY] {0} text.mission=任务[LIGHT_GRAY] {0}
text.mission.wave=存活了 [accent]{0}[] 波。 text.mission.wave=存活了 [accent]{0}[] 波。
text.mission.battle=摧毁敌方基地。 text.mission.battle=摧毁敌方基地。
text.mission.resource=获得 {0} x{1} text.mission.resource=获得 {0}:\n[accent]{1}/{2}[]
text.none=<none> text.none=<none>
text.close=关闭 text.close=关闭
text.quit=退出 text.quit=退出

View File

@@ -20,7 +20,7 @@ public class DefaultKeybinds{
"move_x", new Axis(Input.A, Input.D), "move_x", new Axis(Input.A, Input.D),
"move_y", new Axis(Input.S, Input.W), "move_y", new Axis(Input.S, Input.W),
"select", Input.MOUSE_LEFT, "select", Input.MOUSE_LEFT,
"deselect", Input.SPACE, "deselect", Input.MOUSE_RIGHT,
"break", Input.MOUSE_RIGHT, "break", Input.MOUSE_RIGHT,
"rotate", new Axis(Input.SCROLL), "rotate", new Axis(Input.SCROLL),
"dash", Input.SHIFT_LEFT, "dash", Input.SHIFT_LEFT,

View File

@@ -147,11 +147,13 @@ public class DesktopInput extends InputHandler{
pollInput(); pollInput();
//removed for now, will add back if necessary
/*
if(recipe != null && !Settings.getBool("desktop-place-help-2", false)){ if(recipe != null && !Settings.getBool("desktop-place-help-2", false)){
ui.showInfo("$text.construction.desktop"); ui.showInfo("$text.construction.desktop");
Settings.putBool("desktop-place-help-2", true); Settings.putBool("desktop-place-help-2", true);
Settings.save(); Settings.save();
} }*/
//deselect if not placing //deselect if not placing
if(!isPlacing() && mode == placing){ if(!isPlacing() && mode == placing){

View File

@@ -53,14 +53,14 @@ public class Sectors{
} }
world.sectors.save(); world.sectors.save();
world.setSector(sector); world.setSector(sector);
sector.currentMission().onBegin(); if(!sector.complete) sector.currentMission().onBegin();
}else if(SaveIO.breakingVersions.contains(sector.getSave().getBuild())){ }else if(SaveIO.breakingVersions.contains(sector.getSave().getBuild())){
ui.showInfo("$text.save.old"); ui.showInfo("$text.save.old");
}else try{ }else try{
sector.getSave().load(); sector.getSave().load();
world.setSector(sector); world.setSector(sector);
state.set(State.playing); state.set(State.playing);
sector.currentMission().onBegin(); if(!sector.complete) sector.currentMission().onBegin();
}catch(Exception e){ }catch(Exception e){
Log.err(e); Log.err(e);
sector.getSave().delete(); sector.getSave().delete();
@@ -270,6 +270,7 @@ public class Sectors{
sector.getSave().delete(); sector.getSave().delete();
} }
sector.completedMissions = 0; sector.completedMissions = 0;
sector.complete = false;
initSector(sector); initSector(sector);
for(int x = sector.x; x < sector.width + sector.x; x++){ for(int x = sector.x; x < sector.width + sector.x; x++){

View File

@@ -244,7 +244,7 @@ public class Net{
} }
}else if(!((object instanceof Packet) && ((Packet) object).isUnimportant())){ }else if(!((object instanceof Packet) && ((Packet) object).isUnimportant())){
packetQueue.add(object); packetQueue.add(object);
Log.info("Queuing packet {0}.", object); Log.info("Queuing packet {0}", object);
}else{ }else{
synchronized(packetPoolLock){ synchronized(packetPoolLock){
Pooling.free(object); Pooling.free(object);

View File

@@ -380,7 +380,7 @@ public class HudFragment extends Fragment{
}); });
table.setDisabled(() -> !(world.getSector() != null && world.getSector().currentMission().hasMessage())); table.setDisabled(() -> !(world.getSector() != null && world.getSector().currentMission().hasMessage()));
table.visible(() -> !((world.getSector() == null && state.mode.disableWaves) || !state.mode.showMission)); table.visible(() -> !((world.getSector() == null && state.mode.disableWaves) || !state.mode.showMission || (world.getSector() != null && world.getSector().complete)));
} }
private void addPlayButton(Table table){ private void addPlayButton(Table table){