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

@ -41,7 +41,7 @@ func _physics_process(delta):
pause.lore_entries = lore_entries
get_parent().add_child(pause)
# restart level
if Input.is_action_just_pressed("restart"):
if Input.is_action_just_pressed("restart") and not Game.marathon_mode:
Game.call_deferred("restart_level")
if Game.keys == 50 && Game.shards == 5:

View file

@ -126,7 +126,6 @@ sound test
exit"
[node name="GreyedContinue" type="Label" parent="Panel/Body"]
visible = false
material = SubResource( 6 )
margin_right = 56.0
margin_bottom = 10.0

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()

View file

@ -83,6 +83,16 @@ focus_neighbour_right = NodePath(".")
focus_neighbour_bottom = NodePath("../Settings")
texture_focused = ExtResource( 3 )
[node name="GreyedRestart" type="Label" parent="Body/Restart"]
unique_name_in_owner = true
visible = false
margin_left = 7.0
margin_top = -1.0
margin_right = 63.0
margin_bottom = 9.0
custom_colors/font_color = Color( 0.690196, 0.690196, 0.690196, 1 )
text = "Restart"
[node name="Settings" type="TextureButton" parent="Body"]
pause_mode = 2
material = ExtResource( 1 )