From 6f7e02d56ef07c7042319669550dae3f399e50b4 Mon Sep 17 00:00:00 2001 From: Adrien Ufferte Date: Tue, 24 Jun 2025 09:18:15 +0200 Subject: [PATCH] More debug and cleaning --- resources/user/student_progression.gd | 2 +- sources/gardens/gardens.gd | 6 +++--- sources/minigames/ants/word.gd | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/user/student_progression.gd b/resources/user/student_progression.gd index 592000d8..2c724c2d 100644 --- a/resources/user/student_progression.gd +++ b/resources/user/student_progression.gd @@ -54,7 +54,7 @@ func init_unlocks() -> bool: return has_changes -func get_max_unlocked_lesson() -> int: +func get_max_unlocked_lesson_index() -> int: var max_unlocked_level: int = 1 for index: int in range(unlocks.size()): if unlocks[index + 1]["look_and_learn"] >= Status.Unlocked: diff --git a/sources/gardens/gardens.gd b/sources/gardens/gardens.gd index ba482a7b..95e3b940 100644 --- a/sources/gardens/gardens.gd +++ b/sources/gardens/gardens.gd @@ -103,7 +103,7 @@ func _ready() -> void: # Transition variables # # The maximum unlocked lesson by the player - var max_unlocked_lesson: int = UserDataManager.student_progression.get_max_unlocked_lesson() + 1 + var max_unlocked_lesson: int = UserDataManager.student_progression.get_max_unlocked_lesson_index() + 1 # Defines if the last played minigame or lookandlearn is of the last available lesson var is_current_lesson: bool = transition_data and transition_data.current_lesson_number == max_unlocked_lesson @@ -118,7 +118,7 @@ func _ready() -> void: var is_first_clear: bool = transition_data and transition_data.has("first_clear") and transition_data.first_clear # Defines if a new lesson has been unlocked by the player, setups to play the right animation - var new_lesson_unlocked: bool = transition_data and transition_data.current_lesson_number == UserDataManager.student_progression.get_max_unlocked_lesson() and transition_data.has("minigame_number") && transition_data.minigame_number == 2 and transition_data.minigame_completed + var new_lesson_unlocked: bool = transition_data and transition_data.current_lesson_number == UserDataManager.student_progression.get_max_unlocked_lesson_index() and transition_data.has("minigame_number") && transition_data.minigame_number == 2 and transition_data.minigame_completed #region Progression @@ -193,7 +193,7 @@ func _ready() -> void: # Handles the path var curve: Curve2D = Curve2D.new() - var max_lesson: int = UserDataManager.student_progression.get_max_unlocked_lesson() + var max_lesson: int = UserDataManager.student_progression.get_max_unlocked_lesson_index() if not new_lesson_unlocked: max_lesson += 1 diff --git a/sources/minigames/ants/word.gd b/sources/minigames/ants/word.gd index 0e1b8d01..5722fbe8 100644 --- a/sources/minigames/ants/word.gd +++ b/sources/minigames/ants/word.gd @@ -2,7 +2,7 @@ extends TextureButton class_name Word -signal answer(good: bool) +signal answer(stimulus: String, expected_stimulus: String) signal no_answer() @onready var area: Area2D = $Area2D