diff --git a/maps/map.gd b/maps/map.gd index c87286b..e256720 100644 --- a/maps/map.gd +++ b/maps/map.gd @@ -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: diff --git a/menus/main_menu.tscn b/menus/main_menu.tscn index 26b701f..a7114ba 100644 --- a/menus/main_menu.tscn +++ b/menus/main_menu.tscn @@ -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 diff --git a/objects/hud/pause_screen.gd b/objects/hud/pause_screen.gd index 75455f2..92c1b11 100644 --- a/objects/hud/pause_screen.gd +++ b/objects/hud/pause_screen.gd @@ -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() diff --git a/objects/hud/pause_screen.tscn b/objects/hud/pause_screen.tscn index e1e77a2..5c82ebe 100644 --- a/objects/hud/pause_screen.tscn +++ b/objects/hud/pause_screen.tscn @@ -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 )