no level restart/select shenanagins during the grand marathon

This commit is contained in:
Haze Weathers 2024-03-05 18:46:37 -05:00
parent d06acf2522
commit 3e3b327f5e
4 changed files with 19 additions and 3 deletions

View file

@ -11,6 +11,10 @@ onready var lore_container = $LoreContainer
func _ready():
get_tree().paused = true
$Body/Resume.grab_focus()
if Game.marathon_mode:
$Body/Restart.disabled = true
$Body/Restart.focus_mode = Control.FOCUS_NONE
$"%GreyedRestart".visible = true
#Random lore
if lore_entries != null and not lore_entries.empty():
current_lore = randi() % lore_entries.size()
@ -65,7 +69,10 @@ func _on_ExitLevel_pressed():
Audio.ac_music.set_stream_paused(false)
Audio.ac_pause_music.stop()
get_tree().paused = false
Game.change_map(load("res://menus/level_select_scholar.tscn"))
if Game.marathon_mode:
Game.change_map(load("res://menus/marathon_start.tscn"))
else:
Game.change_map(load("res://menus/level_select_scholar.tscn"))
yield(Fade, "fade_finished")
queue_free()