Debug shortcuts: loadgame, new game without intro

This commit is contained in:
2024-11-13 01:28:04 +01:00
parent 7905433217
commit d80e3d4b36
4 changed files with 33 additions and 2 deletions

View File

@@ -1,6 +1,12 @@
# A simple main menu
extends Control
func _input(event: InputEvent) -> void:
if event.is_action_pressed("debug_loadgame"):
_on_load_game_pressed()
if event.is_action_pressed("debug_no_intro"):
_on_new_without_intro_pressed()
# Start the game
func _on_new_game_pressed():
escoria.new_game()
@@ -41,6 +47,8 @@ func reset():
$main.show()
func _on_new_without_intro_pressed():
escoria.new_game()
escoria.globals_manager.set_global("skip_intro",true)
escoria.globals_manager.set_global("cocina_delante_intro_played",true)
escoria.globals_manager.set_global("cocina_intro_played",true)
escoria.new_game()

View File

@@ -1,6 +1,11 @@
# A menu shown in game
extends Control
func _input(event: InputEvent) -> void:
if event.is_action_pressed("debug_loadgame"):
_on_load_game_pressed()
if event.is_action_pressed("debug_no_intro"):
_on_new_without_intro_pressed()
# Make the pause menu process in pause mode and hide it just to be sure
func _ready():
@@ -74,3 +79,10 @@ func _on_new_game_pressed():
#yield(escoria.new_game(), "completed")
escoria.new_game()
escoria.main.current_scene.game.unpause_game()
func _on_new_without_intro_pressed():
escoria.new_game()
escoria.globals_manager.set_global("skip_intro",true)
escoria.globals_manager.set_global("cocina_delante_intro_played",true)
escoria.globals_manager.set_global("cocina_intro_played",true)