Add way back to profile selection and abandoning a mission

World map gets a "Changer de profil" button (saves first). During a
mission, a header button asks for confirmation then leaves without
stars or items; attempts already made stay recorded and are saved.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Denis Defolie
2026-10-11 22:26:53 +02:00
parent 65a0cb46f9
commit ebe2dbe3ed
7 changed files with 134 additions and 16 deletions
+10
View File
@@ -16,6 +16,7 @@ var _viewed_level := "CE1"
@onready var _level_toggle_button: Button = %LevelToggleButton
@onready var _total_stars_label: Label = %TotalStarsLabel
@onready var _collection_button: Button = %CollectionButton
@onready var _profile_button: Button = %ProfileButton
func _ready() -> void:
@@ -24,6 +25,8 @@ func _ready() -> void:
_level_toggle_button.pressed.connect(_on_level_toggle_pressed)
_collection_button.text = UIText.get_text("world_map.collection_button")
_collection_button.pressed.connect(_on_collection_pressed)
_profile_button.text = UIText.get_text("world_map.change_profile_button")
_profile_button.pressed.connect(_on_change_profile_pressed)
_refresh()
@@ -49,6 +52,13 @@ func _populate_missions() -> void:
_map_area.add_child(_build_marker(mission))
## Revient au choix du profil sans rien perdre : la progression est ecrite
## avant de quitter la carte (le profil se rechargera a la prochaine selection).
func _on_change_profile_pressed() -> void:
ProgressManager.save_now()
GameManager.goto(GameManager.SCENE_PROFILE_SELECT)
func _on_collection_pressed() -> void:
GameManager.goto(GameManager.SCENE_COLLECTION)