forked from team-sg/hero-mark-2
no level restart/select shenanagins during the grand marathon
This commit is contained in:
parent
d06acf2522
commit
3e3b327f5e
4 changed files with 19 additions and 3 deletions
|
@ -41,7 +41,7 @@ func _physics_process(delta):
|
||||||
pause.lore_entries = lore_entries
|
pause.lore_entries = lore_entries
|
||||||
get_parent().add_child(pause)
|
get_parent().add_child(pause)
|
||||||
# restart level
|
# 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")
|
Game.call_deferred("restart_level")
|
||||||
|
|
||||||
if Game.keys == 50 && Game.shards == 5:
|
if Game.keys == 50 && Game.shards == 5:
|
||||||
|
|
|
@ -126,7 +126,6 @@ sound test
|
||||||
exit"
|
exit"
|
||||||
|
|
||||||
[node name="GreyedContinue" type="Label" parent="Panel/Body"]
|
[node name="GreyedContinue" type="Label" parent="Panel/Body"]
|
||||||
visible = false
|
|
||||||
material = SubResource( 6 )
|
material = SubResource( 6 )
|
||||||
margin_right = 56.0
|
margin_right = 56.0
|
||||||
margin_bottom = 10.0
|
margin_bottom = 10.0
|
||||||
|
|
|
@ -11,6 +11,10 @@ onready var lore_container = $LoreContainer
|
||||||
func _ready():
|
func _ready():
|
||||||
get_tree().paused = true
|
get_tree().paused = true
|
||||||
$Body/Resume.grab_focus()
|
$Body/Resume.grab_focus()
|
||||||
|
if Game.marathon_mode:
|
||||||
|
$Body/Restart.disabled = true
|
||||||
|
$Body/Restart.focus_mode = Control.FOCUS_NONE
|
||||||
|
$"%GreyedRestart".visible = true
|
||||||
#Random lore
|
#Random lore
|
||||||
if lore_entries != null and not lore_entries.empty():
|
if lore_entries != null and not lore_entries.empty():
|
||||||
current_lore = randi() % lore_entries.size()
|
current_lore = randi() % lore_entries.size()
|
||||||
|
@ -65,7 +69,10 @@ func _on_ExitLevel_pressed():
|
||||||
Audio.ac_music.set_stream_paused(false)
|
Audio.ac_music.set_stream_paused(false)
|
||||||
Audio.ac_pause_music.stop()
|
Audio.ac_pause_music.stop()
|
||||||
get_tree().paused = false
|
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")
|
yield(Fade, "fade_finished")
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,16 @@ focus_neighbour_right = NodePath(".")
|
||||||
focus_neighbour_bottom = NodePath("../Settings")
|
focus_neighbour_bottom = NodePath("../Settings")
|
||||||
texture_focused = ExtResource( 3 )
|
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"]
|
[node name="Settings" type="TextureButton" parent="Body"]
|
||||||
pause_mode = 2
|
pause_mode = 2
|
||||||
material = ExtResource( 1 )
|
material = ExtResource( 1 )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue