diff options
Diffstat (limited to 'client/player/controllable_player.gd')
-rw-r--r-- | client/player/controllable_player.gd | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/client/player/controllable_player.gd b/client/player/controllable_player.gd index f0d573c8..58d3d1e6 100644 --- a/client/player/controllable_player.gd +++ b/client/player/controllable_player.gd @@ -100,7 +100,7 @@ func _process_movement(delta): var was_boosting = boosting direction = input update(delta, boost) - if boosting and not was_boosting: + if boosting and not was_boosting and Global.get_setting("gameplay.vibration"): Input.start_joy_vibration(0, 0, input.length(), 0.15) Input.vibrate_handheld(75, input.length() * 0.1) walking = input.length_squared() > 0.1 @@ -172,8 +172,9 @@ func progress(position__: float, speed: float, warn: bool): current_vibration_strength = position__ current_vibration_change = speed var vibration_strength := pow(current_vibration_strength, 3) - Input.start_joy_vibration(0, vibration_strength, 0, 0.1) - Input.vibrate_handheld(100, vibration_strength) + if Global.get_setting("gameplay.vibration"): # todo maybe include the lines above too + Input.start_joy_vibration(0, vibration_strength, 0, 0.1) + Input.vibrate_handheld(100, vibration_strength) vibration_timer.start() if speed == 0: current_vibration_strength = 0. @@ -190,13 +191,15 @@ func _on_vibration_timeout(): func put_item(tile: Tile): super(tile) - Input.start_joy_vibration(0, 0.1, 0.0, 0.075) - Input.vibrate_handheld(75, 0.1) + if Global.get_setting("gameplay.vibration"): + Input.start_joy_vibration(0, 0.1, 0.0, 0.075) + Input.vibrate_handheld(75, 0.1) func take_item(tile: Tile): super(tile) - Input.start_joy_vibration(0, 0.1, 0.0, 0.075) - Input.vibrate_handheld(75, 0.1) + if Global.get_setting("gameplay.vibration"): + Input.start_joy_vibration(0, 0.1, 0.0, 0.075) + Input.vibrate_handheld(75, 0.1) func interact(): if not is_input_enabled(): return |