Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Keyboard Shortcut for "Next Wave" Feature #10521

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,7 @@ keybind.shoot.name = Shoot
keybind.zoom.name = Zoom
keybind.menu.name = Menu
keybind.pause.name = Pause
keybind.skip_wave.name = Skip Wave
keybind.pause_building.name = Pause/Resume Building
keybind.minimap.name = Minimap
keybind.planet_map.name = Planet Map
Expand Down
1 change: 1 addition & 0 deletions core/assets/bundles/bundle_id_ID.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,7 @@ keybind.shoot.name = Menembak
keybind.zoom.name = Perbesar
keybind.menu.name = Menu
keybind.pause.name = Jeda
keybind.skip_wave.name = Percepat Gelombang
keybind.pause_building.name = Jeda/Lanjut Membangun
keybind.minimap.name = Peta Kecil
keybind.planet_map.name = Peta Planet
Expand Down
1 change: 1 addition & 0 deletions core/assets/contributors
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,4 @@ BlueTheCube
sasha0552
1ue999
6-BennyLi-9
neoBedjo
1 change: 1 addition & 0 deletions core/src/mindustry/input/Binding.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public enum Binding implements KeyBind{
menu(Vars.android ? KeyCode.back : KeyCode.escape),
fullscreen(KeyCode.f11),
pause(KeyCode.space),
skip_wave(KeyCode.f9),
minimap(KeyCode.m),
research(KeyCode.j),
planet_map(KeyCode.n),
Expand Down
10 changes: 10 additions & 0 deletions core/src/mindustry/ui/fragments/HudFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,16 @@ public float getPrefHeight(){
//wave info button with text
s.add(makeStatusTable()).grow().name("status");

s.update(() -> {
if(Core.input.keyTap(Binding.skip_wave) && canSkipWave()){
if(net.client() && player.admin){
Call.adminRequest(player, AdminAction.wave, null);
}else{
logic.skipWave();
}
}
});

var rightStyle = new ImageButtonStyle(){{
over = buttonRightOver;
down = buttonRightDown;
Expand Down