From fa9a3df37f5ac9a987ca5b80faf8836dac06efcf Mon Sep 17 00:00:00 2001 From: Pierre Poupin Date: Tue, 19 Jul 2022 00:53:44 +0200 Subject: [PATCH] chore: add check on debug mode --- Bears/GenericBear/Scripts/GenericBear.gd | 2 -- World/World.gd | 2 +- project.godot | 6 ++++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Bears/GenericBear/Scripts/GenericBear.gd b/Bears/GenericBear/Scripts/GenericBear.gd index f41907e..b6472c9 100644 --- a/Bears/GenericBear/Scripts/GenericBear.gd +++ b/Bears/GenericBear/Scripts/GenericBear.gd @@ -76,8 +76,6 @@ func _parse_inputs() -> void: # Virtual function to override # Used to handle logic of the bear func _update(_delta) -> void: - if Input.is_action_just_pressed("debug_2"): - _talk() pass func _update_velocity() -> void: diff --git a/World/World.gd b/World/World.gd index e1e705e..5761739 100644 --- a/World/World.gd +++ b/World/World.gd @@ -98,7 +98,7 @@ func _next_day_cycle_phase() -> void: _fade_light(canvas_modulate.get_color(), _day_cycle_phase.duration) func _input(event) -> void: - if event.is_action_pressed("debug_1"): + if OS.is_debug_build() and event.is_action_pressed("debug_1"): _next_day_cycle_phase() func _on_DayCycleTween_tween_completed(_object, _key) -> void: diff --git a/project.godot b/project.godot index 3926bb6..d11923a 100644 --- a/project.godot +++ b/project.godot @@ -204,11 +204,13 @@ p1_secondary_action={ } debug_1={ "deadzone": 0.5, -"events": [ ] +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":49,"unicode":0,"echo":false,"script":null) + ] } debug_2={ "deadzone": 0.5, -"events": [ ] +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":50,"unicode":0,"echo":false,"script":null) + ] } [physics]