diff --git a/README.md b/README.md index 3922790..976a973 100644 --- a/README.md +++ b/README.md @@ -36,20 +36,15 @@ Source code: https://codeberg.org/hut/outfly - E: Interact: Talk to people, enter vehicles - F: Flashlight - Q: Exit vehicle +- Tab: Toggle Augmented Reality +- M: Map +- H: 3rd person perspective +- Y: Toggle rotation stabilizer +- F11: Fullscreen - JKULIO: Mouseless camera rotation - Augmented Reality: (toggle with Tab) - Left click: Target objects - Right click: Zoom -- Settings - - Tab: Toggle HUD/AR - - M: Toggle map - - H: Toggle 3rd person view - - Y: Toggle rotation stabilizer - - F2: Toggle shadows - - F3: Toggle sound effects - - F4: Toggle music - - F7: Restart game - - F11: Toggle fullscreen - Cheats - G: Toggle god mode / cheats - V/B: Impossible acceleration forward/backward diff --git a/src/actor.rs b/src/actor.rs index 6230114..a704b91 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -296,7 +296,6 @@ pub fn handle_input( q_vehicles: Query<(Entity, &Transform), (With, Without, Without)>, mut ew_conv: EventWriter, mut ew_vehicle: EventWriter, - mut ew_playerdies: EventWriter, mut ew_sfx: EventWriter, q_player_drives: Query>, ) { @@ -363,10 +362,6 @@ pub fn handle_input( } } } - else if keyboard_input.just_pressed(settings.key_restart) { - settings.god_mode = false; - ew_playerdies.send(game::PlayerDiesEvent(DamageType::DivineIntervention)); - } } pub fn handle_vehicle_enter_exit( diff --git a/src/audio.rs b/src/audio.rs index 11ca247..1bc70bf 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -19,7 +19,6 @@ pub struct AudioPlugin; impl Plugin for AudioPlugin { fn build(&self, app: &mut App) { app.add_systems(Startup, setup); - app.add_systems(Update, handle_input.run_if(in_control)); app.add_systems(Update, respawn_sinks.run_if(on_event::())); app.add_systems(Update, play_zoom_sfx); app.add_systems(Update, pause_all.run_if(on_event::())); @@ -158,22 +157,6 @@ pub fn respawn_sinks( } } -pub fn handle_input( - keyboard_input: Res>, - mut ew_sfx: EventWriter, - mut ew_game: EventWriter, - settings: Res, -) { - if keyboard_input.just_pressed(settings.key_toggle_music) { - ew_sfx.send(PlaySfxEvent(Sfx::Click)); - ew_game.send(GameEvent::SetMusic(Toggle)); - } - if keyboard_input.just_pressed(settings.key_toggle_sfx) { - ew_sfx.send(PlaySfxEvent(Sfx::Click)); - ew_game.send(GameEvent::SetMusic(Toggle)); - } -} - pub fn play_sfx( mut commands: Commands, settings: Res, diff --git a/src/camera.rs b/src/camera.rs index aa78ebe..3527a99 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -312,9 +312,6 @@ pub fn handle_input( if keyboard_input.just_pressed(settings.key_camera) { ew_game.send(GameEvent::SetThirdPerson(Toggle)); } - if keyboard_input.just_pressed(settings.key_shadows) { - ew_game.send(GameEvent::SetShadows(Toggle)); - } if keyboard_input.just_pressed(settings.key_map) { ew_game.send(GameEvent::SetMap(Toggle)); } diff --git a/src/data/keybindings.in b/src/data/keybindings.in index 757da70..3c702ff 100644 --- a/src/data/keybindings.in +++ b/src/data/keybindings.in @@ -3,25 +3,19 @@ Space: Slow down (or match velocity) AWSD/Shift/Ctrl: Movement R: Rotate (hold + move mouse) E: Interact: Talk to people, enter vehicles -Q: Exit vehicle F: Flashlight +Q: Exit vehicle +Tab: Toggle Augmented Reality M: Map -Tab: Toggle HUD + Augmented Reality +H: 3rd person perspective +Y: Rotation stabilizer +F11: Fullscreen J/K/U/L/I/O: Rotate Augmented Reality only: Left click: Target objects Right click: Zoom -Settings: -H: 3rd person view -Y: Rotation stabilizer -F2: Toggle shadows -F3: Toggle sound effects -F4: Toggle music -F7: Restart game -F11: Toggle fullscreen - Cheats: G: Toggle god mode + cheats V/B: Impossible acceleration forward/backward diff --git a/src/var.rs b/src/var.rs index 2a438c1..62c966d 100644 --- a/src/var.rs +++ b/src/var.rs @@ -89,7 +89,6 @@ pub struct Settings { //pub key_map_zoom_in_wheel: MouseButton, pub key_togglehud: KeyCode, pub key_menu: KeyCode, - pub key_restart: KeyCode, pub key_fullscreen: KeyCode, pub key_help: KeyCode, pub key_forward: KeyCode, @@ -104,7 +103,6 @@ pub struct Settings { pub key_vehicle: KeyCode, pub key_camera: KeyCode, pub key_flashlight: KeyCode, - pub key_shadows: KeyCode, pub key_rotate: KeyCode, pub key_rotation_stabilizer: KeyCode, pub key_mouseup: KeyCode, @@ -113,8 +111,6 @@ pub struct Settings { pub key_mouseright: KeyCode, pub key_rotateleft: KeyCode, pub key_rotateright: KeyCode, - pub key_toggle_sfx: KeyCode, - pub key_toggle_music: KeyCode, pub key_reply1: KeyCode, pub key_reply2: KeyCode, pub key_reply3: KeyCode, @@ -206,7 +202,6 @@ impl Default for Settings { //key_map_zoom_in_wheel: KeyCode::Shift, key_togglehud: KeyCode::Tab, key_menu: KeyCode::Escape, - key_restart: KeyCode::F7, key_fullscreen: KeyCode::F11, key_help: KeyCode::F1, key_forward: KeyCode::KeyW, @@ -221,7 +216,6 @@ impl Default for Settings { key_vehicle: KeyCode::KeyQ, key_camera: KeyCode::KeyH, key_flashlight: KeyCode::KeyF, - key_shadows: KeyCode::F2, key_rotate: KeyCode::KeyR, key_rotation_stabilizer: KeyCode::KeyY, key_mouseup: KeyCode::KeyI, @@ -230,8 +224,6 @@ impl Default for Settings { key_mouseright: KeyCode::KeyL, key_rotateleft: KeyCode::KeyU, key_rotateright: KeyCode::KeyO, - key_toggle_sfx: KeyCode::F3, - key_toggle_music: KeyCode::F4, key_reply1: KeyCode::Digit1, key_reply2: KeyCode::Digit2, key_reply3: KeyCode::Digit3,