Merge branch '2.1.6' into nomenclature-pass

This commit is contained in:
Adrien Ufferte
2025-09-11 16:36:24 +02:00
committed by GitHub
7 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ config_version=5
[application]
config/name="Kalulu"
config/version="2.1.5"
config/version="2.1.6"
run/main_scene="res://sources/menus/splash_screen/splash_screen.tscn"
config/features=PackedStringArray("4.4", "Forward Plus")
boot_splash/bg_color=Color(0.141176, 0.141176, 0.141176, 1)
+8 -8
View File
@@ -6,7 +6,7 @@ signal minigame_layout_opened()
const KALULU := preload("res://sources/minigames/base/kalulu.gd")
const GARDEN_SCENE: PackedScene = preload("res://resources/gardens/garden.tscn")
const LOOK_AND_LEARN_SCENE: PackedScene = preload("res://sources/look_and_learn/look_and_learn.tscn")
const FLOWER_FVX: PackedScene = preload("res://sources/gardens/flower_particle.tscn")
const FLOWER_VFX: PackedScene = preload("res://sources/gardens/flower_particle.tscn")
const GARDEN_SIZE: int = 2400
static var transition_data: Dictionary = {}
@@ -277,14 +277,14 @@ func _ready() -> void:
play_animation = true
if play_animation:
var fvfx: FlowerVFX = FLOWER_FVX.instantiate()
current_garden.flower_controls[flower_ind].add_child(fvfx)
fvfx.anchor_bottom = 0.5
fvfx.anchor_top = 0.5
fvfx.anchor_left = 0.5
fvfx.anchor_right = 0.5
var flower_vfx: FlowerVFX = FLOWER_VFX.instantiate()
current_garden.flower_controls[flower_ind].add_child(flower_vfx)
flower_vfx.anchor_bottom = 0.5
flower_vfx.anchor_top = 0.5
flower_vfx.anchor_left = 0.5
flower_vfx.anchor_right = 0.5
fvfx.play()
flower_vfx.play()
await get_tree().create_timer(0.5).timeout
current_garden.update_flowers()
@@ -120,7 +120,7 @@ func is_language_directory_valid(path: String) -> bool:
var file_name: String = dir.get_next()
dir.list_dir_end()
return file_name != "" && dir.file_exists("language.db")
return file_name != "" and dir.file_exists("language.db")
func _process(_delta: float) -> void:
@@ -11,9 +11,9 @@ func _init() -> void:
func apply(control: Control, value: Variant) -> RuleResult:
var result: RuleResult = RuleResult.new()
if confirm_control_path && value is String:
if confirm_control_path and value is String:
var confirm_control: Control = control.get_child(0).get_node(confirm_control_path)
result.passed = confirm_control && Validation.find_validator(control).get_value(confirm_control) == value
result.passed = confirm_control and Validation.find_validator(control).get_value(confirm_control) == value
if not result.passed:
result.message = fail_message
return result
+1 -1
View File
@@ -29,7 +29,7 @@ func _create_lessons() -> void:
for lesson_unlock: Node in lesson_container.get_children():
lesson_unlock.queue_free()
Database.db.query("SELECT LessonNb, group_concat(Grapheme || '-' ||Phoneme, ' ') GPs FROM Lessons
Database.db.query("SELECT LessonNb, group_concat(Grapheme || '-' || Phoneme, ' ') GPs FROM Lessons
INNER JOIN GPsInLessons ON GPsInLessons.LessonID = Lessons.ID
INNER JOIN GPs ON GPsInLessons.GPID = GPs.ID
GROUP BY LessonNb
+1 -1
View File
@@ -95,7 +95,7 @@ func _init_log_file() -> void:
# Internal log function (renamed to avoid conflict)
func _log_internal(level: LogLevel, message: String) -> void:
if initialized && level < current_level: # If not initialized, no logs are filtered
if initialized and level < current_level: # If not initialized, no logs are filtered
return
var prefix: String = "[LOG]"
@@ -105,33 +105,33 @@ func _determine_students_update(response_body: Dictionary, need_update_user: Upd
var server_student_progression_unix_time: int = -1
if student_dic.has("progression_last_modified"):
if student_dic.progression_last_modified != null && student_dic.progression_last_modified is String:
if student_dic.progression_last_modified != null and student_dic.progression_last_modified is String:
server_student_progression_unix_time = Time.get_unix_time_from_datetime_string(student_dic.progression_last_modified as String)
else:
server_student_progression_unix_time = 0
var server_student_remediation_gp_unix_time: int = -1
if student_dic.has("gp_remediation_last_modified"):
if student_dic.gp_remediation_last_modified != null && student_dic.gp_remediation_last_modified is String:
if student_dic.gp_remediation_last_modified != null and student_dic.gp_remediation_last_modified is String:
server_student_remediation_gp_unix_time = Time.get_unix_time_from_datetime_string(student_dic.gp_remediation_last_modified as String)
else:
server_student_remediation_gp_unix_time = 0
var server_student_remediation_syllables_unix_time: int = -1
if student_dic.has("syllables_remediation_last_modified"):
if student_dic.syllables_remediation_last_modified != null && student_dic.syllables_remediation_last_modified is String:
if student_dic.syllables_remediation_last_modified != null and student_dic.syllables_remediation_last_modified is String:
server_student_remediation_syllables_unix_time = Time.get_unix_time_from_datetime_string(student_dic.syllables_remediation_last_modified as String)
else:
server_student_remediation_syllables_unix_time = 0
var server_student_remediation_words_unix_time: int = -1
if student_dic.has("words_remediation_last_modified"):
if student_dic.words_remediation_last_modified != null && student_dic.words_remediation_last_modified is String:
if student_dic.words_remediation_last_modified != null and student_dic.words_remediation_last_modified is String:
server_student_remediation_words_unix_time = Time.get_unix_time_from_datetime_string(student_dic.words_remediation_last_modified as String)
else:
server_student_remediation_words_unix_time = 0
var server_student_confusion_matrix_gp_unix_time: int = -1
if student_dic.has("confusion_matrix_gp_last_modified"):
if student_dic.confusion_matrix_gp_last_modified != null && student_dic.confusion_matrix_gp_last_modified is String:
if student_dic.confusion_matrix_gp_last_modified != null and student_dic.confusion_matrix_gp_last_modified is String:
server_student_confusion_matrix_gp_unix_time = Time.get_unix_time_from_datetime_string(student_dic.confusion_matrix_gp_last_modified as String)
else:
server_student_confusion_matrix_gp_unix_time = 0
@@ -417,7 +417,7 @@ func _apply_server_response(response_body: Dictionary) -> void:
var response_student_data: Dictionary = response_students[response_student_code]
if validate_student_data(response_student_data):
UserDataManager.teacher_settings.set_data_student_with_code(int(response_student_code), int(response_student_data.device_id as float), response_student_data.name as String, int(response_student_data.age as float), response_student_data.updated_at as String)
if response_student_data.has("progression") && (response_student_data.progression as Dictionary).has("version") && (response_student_data.progression as Dictionary).has("unlocked") && (response_student_data.progression as Dictionary).has("updated_at"):
if response_student_data.has("progression") and (response_student_data.progression as Dictionary).has("version") and (response_student_data.progression as Dictionary).has("unlocked") and (response_student_data.progression as Dictionary).has("updated_at"):
#Cleaning data because of JSON parsing changing types int / float / string
var received_unlock_data: Dictionary = response_student_data.progression.unlocked as Dictionary
var new_unlock_data: Dictionary = {}
@@ -428,7 +428,7 @@ func _apply_server_response(response_body: Dictionary) -> void:
@warning_ignore("unsafe_call_argument")
(new_unlock_data[int(key_lesson)]["games"] as Array).push_back(int(game_result))
UserDataManager.set_student_progression_data(int(response_student_code), response_student_data.progression.version as String, new_unlock_data, response_student_data.progression.updated_at as String)
if response_student_data.has("remediation_gp") && (response_student_data.remediation_gp as Dictionary).has("score_remediation") && (response_student_data.remediation_gp as Dictionary).has("updated_at"):
if response_student_data.has("remediation_gp") and (response_student_data.remediation_gp as Dictionary).has("score_remediation") and (response_student_data.remediation_gp as Dictionary).has("updated_at"):
# TODO ADD SECURITY
var new_array: Array = JSON.parse_string(response_student_data.remediation_gp.score_remediation as String) as Array
var new_gp_scores: Dictionary[int, int] = {}
@@ -436,7 +436,7 @@ func _apply_server_response(response_body: Dictionary) -> void:
# TODO ADD SECURITY
new_gp_scores[int(new_array[index][0] as float)] = int(new_array[index][1] as float)
UserDataManager.set_student_remediation_gp_data(int(response_student_code), new_gp_scores, response_student_data.remediation_gp.updated_at as String)
if response_student_data.has("remediation_syllables") && (response_student_data.remediation_syllables as Dictionary).has("score_remediation") && (response_student_data.remediation_syllables as Dictionary).has("updated_at"):
if response_student_data.has("remediation_syllables") and (response_student_data.remediation_syllables as Dictionary).has("score_remediation") and (response_student_data.remediation_syllables as Dictionary).has("updated_at"):
# TODO ADD SECURITY
var new_array: Array = JSON.parse_string(response_student_data.remediation_syllables.score_remediation as String) as Array
var new_syllables_scores: Dictionary[int, int] = {}
@@ -444,7 +444,7 @@ func _apply_server_response(response_body: Dictionary) -> void:
# TODO ADD SECURITY
new_syllables_scores[int(new_array[index][0] as float)] = int(new_array[index][1] as float)
UserDataManager.set_student_remediation_syllables_data(int(response_student_code), new_syllables_scores, response_student_data.remediation_syllables.updated_at as String)
if response_student_data.has("remediation_words") && (response_student_data.remediation_words as Dictionary).has("score_remediation") && (response_student_data.remediation_words as Dictionary).has("updated_at"):
if response_student_data.has("remediation_words") and (response_student_data.remediation_words as Dictionary).has("score_remediation") and (response_student_data.remediation_words as Dictionary).has("updated_at"):
# TODO ADD SECURITY
var new_array: Array = JSON.parse_string(response_student_data.remediation_words.score_remediation as String) as Array
var new_words_scores: Dictionary[int, int] = {}
@@ -452,7 +452,7 @@ func _apply_server_response(response_body: Dictionary) -> void:
# TODO ADD SECURITY
new_words_scores[int(new_array[index][0] as float)] = int(new_array[index][1] as float)
UserDataManager.set_student_remediation_words_data(int(response_student_code), new_words_scores, response_student_data.remediation_words.updated_at as String)
if response_student_data.has("confusion_matrix_gp") && (response_student_data.confusion_matrix_gp as Dictionary).has("confusion_matrix") && (response_student_data.confusion_matrix_gp as Dictionary).has("updated_at"):
if response_student_data.has("confusion_matrix_gp") and (response_student_data.confusion_matrix_gp as Dictionary).has("confusion_matrix") and (response_student_data.confusion_matrix_gp as Dictionary).has("updated_at"):
# TODO ADD SECURITY
var new_array: Array = response_student_data.confusion_matrix_gp.confusion_matrix
var new_confusion_matrix_gp: Dictionary[int, PackedInt32Array] = {}