Various tweaks and bugfixes
This commit is contained in:
@@ -22,6 +22,7 @@ import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.graphics.g3d.*;
|
||||
import mindustry.input.*;
|
||||
import mindustry.maps.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
@@ -60,7 +61,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
shouldPause = true;
|
||||
|
||||
keyDown(key -> {
|
||||
if(key == KeyCode.escape || key == KeyCode.back){
|
||||
if(key == KeyCode.escape || key == KeyCode.back || key == Core.keybinds.get(Binding.planet_map).key){
|
||||
if(showing() && newPresets.size > 1){
|
||||
//clear all except first, which is the last sector.
|
||||
newPresets.truncate(1);
|
||||
@@ -684,7 +685,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
if(sector.info.wavesSurvived >= 0 && sector.info.wavesSurvived - sector.info.wavesPassed >= 0 && !sector.isBeingPlayed()){
|
||||
int toCapture = sector.info.attack || sector.info.winWave <= 1 ? -1 : sector.info.winWave - (sector.info.wave + sector.info.wavesPassed);
|
||||
boolean plus = (sector.info.wavesSurvived - sector.info.wavesPassed) >= SectorDamage.maxRetWave - 1;
|
||||
stable.add(Core.bundle.format("sectors.survives", Math.min(sector.info.wavesSurvived - sector.info.wavesPassed, toCapture <= 0 ? 200 : 0) +
|
||||
stable.add(Core.bundle.format("sectors.survives", Math.min(sector.info.wavesSurvived - sector.info.wavesPassed, toCapture <= 0 ? 200 : toCapture) +
|
||||
(plus ? "+" : "") + (toCapture < 0 ? "" : "/" + toCapture)));
|
||||
stable.row();
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import mindustry.game.EventType.*;
|
||||
import mindustry.game.Objectives.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.input.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.ui.layout.*;
|
||||
@@ -114,6 +115,12 @@ public class ResearchDialog extends BaseDialog{
|
||||
|
||||
addCloseButton();
|
||||
|
||||
keyDown(key -> {
|
||||
if(key == Core.keybinds.get(Binding.research).key){
|
||||
Core.app.post(this::hide);
|
||||
}
|
||||
});
|
||||
|
||||
buttons.button("@database", Icon.book, () -> {
|
||||
hide();
|
||||
ui.database.show();
|
||||
|
||||
@@ -396,7 +396,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
graphics.checkPref("blockstatus", false);
|
||||
graphics.checkPref("playerchat", true);
|
||||
if(!mobile){
|
||||
graphics.checkPref("coreitems", false);
|
||||
graphics.checkPref("coreitems", true);
|
||||
}
|
||||
graphics.checkPref("minimap", !mobile);
|
||||
graphics.checkPref("smoothcamera", true);
|
||||
|
||||
@@ -50,7 +50,9 @@ public class HintsFragment extends Fragment{
|
||||
}else if(hints.size > 0){
|
||||
//check one hint each frame to see if it should be shown.
|
||||
Hint hint = hints.find(Hint::show);
|
||||
if(hint != null && !hint.finished() & !hint.complete()){
|
||||
if(hint != null && hint.complete()){
|
||||
hints.remove(hint);
|
||||
}else if(hint != null){
|
||||
display(hint);
|
||||
}
|
||||
}
|
||||
@@ -79,7 +81,7 @@ public class HintsFragment extends Fragment{
|
||||
void checkNext(){
|
||||
if(current != null) return;
|
||||
|
||||
hints.removeAll(h -> h == current || !h.valid() || h.finished() || (h.show() && h.complete()));
|
||||
hints.removeAll(h -> !h.valid() || h.finished() || (h.show() && h.complete()));
|
||||
hints.sort(Hint::order);
|
||||
|
||||
Hint first = hints.find(Hint::show);
|
||||
@@ -158,6 +160,7 @@ public class HintsFragment extends Fragment{
|
||||
payloadPickup(() -> !player.unit().dead && player.unit() instanceof Payloadc p && p.payloads().isEmpty(), () -> player.unit() instanceof Payloadc p && p.payloads().any()),
|
||||
payloadDrop(() -> !player.unit().dead && player.unit() instanceof Payloadc p && p.payloads().any(), () -> player.unit() instanceof Payloadc p && p.payloads().isEmpty()),
|
||||
waveFire(() -> Groups.fire.size() > 0 && Blocks.wave.unlockedNow(), () -> indexer.getAllied(state.rules.defaultTeam, BlockFlag.extinguisher).size() > 0),
|
||||
generator(() -> control.input.block == Blocks.combustionGenerator, () -> ui.hints.placedBlocks.contains(Blocks.combustionGenerator)),
|
||||
;
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user