Fixes a bug with the student code attribution. Fixes a bug in the syllable minigames when updating GP scores.

This commit is contained in:
Dylan Sarrazyn
2024-10-15 13:12:11 +02:00
parent 275491e92d
commit 51c999a19a
11 changed files with 31 additions and 34 deletions
+1 -1
View File
@@ -577,7 +577,7 @@ architectures/armeabi-v7a=false
architectures/arm64-v8a=true
architectures/x86=false
architectures/x86_64=false
version/code=33
version/code=34
version/name=""
package/unique_name="org.godotengine.kalulu"
package/name=""
+1 -1
View File
@@ -11,7 +11,7 @@ config_version=5
[application]
config/name="Kalulu"
config/version="2.0.3"
config/version="2.0.4"
run/main_scene="res://sources/menus/splash_screen/splash_screen.tscn"
config/features=PackedStringArray("4.3", "Forward Plus")
boot_splash/bg_color=Color(0.141176, 0.141176, 0.141176, 1)
File diff suppressed because one or more lines are too long
+5 -3
View File
@@ -75,9 +75,11 @@ func get_new_code() -> String :
if used_codes.size() == available_codes.size():
return ""
var code : String = available_codes.pick_random()
while code in used_codes:
code = available_codes.pick_random()
var codes = available_codes.duplicate()
for c in used_codes:
codes.erase(c)
var code : String = codes.pick_random()
return code
+4 -9
View File
@@ -1,15 +1,12 @@
[gd_scene load_steps=20 format=3 uid="uid://djduptonofbh4"]
[gd_scene load_steps=17 format=3 uid="uid://djduptonofbh4"]
[ext_resource type="Script" path="res://sources/menus/components/code_keyboard.gd" id="1_4kb0k"]
[ext_resource type="Texture2D" uid="uid://d3rhl050u0ahl" path="res://assets/menus/login/password_background.png" id="1_qy2tt"]
[ext_resource type="Texture2D" uid="uid://de8087qre3hqd" path="res://assets/menus/login/button_symbol01_up.png" id="2_lewtn"]
[ext_resource type="Script" path="res://sources/menus/components/password_visualizer.gd" id="2_sr5ud"]
[ext_resource type="Texture2D" uid="uid://ce2dk2so7yo85" path="res://assets/menus/login/button_symbol01_down.png" id="3_6vmwg"]
[ext_resource type="Texture2D" uid="uid://b6vmq2e1krf6c" path="res://assets/menus/login/symbol01.png" id="3_640rk"]
[ext_resource type="Texture2D" uid="uid://c1orskmogfiy1" path="res://assets/menus/login/symbol02.png" id="4_260o2"]
[ext_resource type="Texture2D" uid="uid://cq6ctjti7nroe" path="res://assets/menus/login/button_symbol02_up.png" id="4_xtie5"]
[ext_resource type="Texture2D" uid="uid://cghxguj0vdhx7" path="res://assets/menus/login/button_symbol02_down.png" id="5_ckp8y"]
[ext_resource type="Texture2D" uid="uid://dgjpftdenxiws" path="res://assets/menus/login/symbol03.png" id="5_x6uw2"]
[ext_resource type="Texture2D" uid="uid://bxrtewrqlop6h" path="res://assets/menus/login/button_symbol03_up.png" id="6_5kh6d"]
[ext_resource type="Texture2D" uid="uid://da7g76llxx8t5" path="res://assets/menus/login/button_symbol03_down.png" id="7_njqxu"]
[ext_resource type="Texture2D" uid="uid://bh7toiwhvln0v" path="res://assets/menus/login/button_symbol04_up.png" id="8_70a0u"]
@@ -56,8 +53,8 @@ metadata/_edit_use_anchors_ = true
[node name="Icon1" type="TextureRect" parent="PasswordVisualizer/Panel1"]
unique_name_in_owner = true
custom_minimum_size = Vector2(420, 420)
layout_mode = 2
texture = ExtResource("3_640rk")
expand_mode = 1
stretch_mode = 4
@@ -69,9 +66,8 @@ metadata/_edit_use_anchors_ = true
[node name="Icon2" type="TextureRect" parent="PasswordVisualizer/Panel2"]
unique_name_in_owner = true
custom_minimum_size = Vector2(200, 200)
custom_minimum_size = Vector2(420, 420)
layout_mode = 2
texture = ExtResource("4_260o2")
expand_mode = 2
stretch_mode = 4
@@ -83,9 +79,8 @@ metadata/_edit_use_anchors_ = true
[node name="Icon3" type="TextureRect" parent="PasswordVisualizer/Panel3"]
unique_name_in_owner = true
custom_minimum_size = Vector2(200, 200)
custom_minimum_size = Vector2(420, 420)
layout_mode = 2
texture = ExtResource("5_x6uw2")
expand_mode = 2
stretch_mode = 4
+1 -1
View File
@@ -133,9 +133,9 @@ autowrap_mode = 2
[node name="PopupInfo" type="Label" parent="Popup/Container/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
auto_translate_mode = 2
layout_mode = 2
size_flags_vertical = 3
auto_translate = false
theme_override_font_sizes/font_size = 50
text = "TEST"
horizontal_alignment = 1
@@ -16,6 +16,7 @@ func _on_next() -> bool:
var register_data = data as TeacherSettings
if register_data:
var students : Array[StudentData] = []
register_data.students[device_id] = students
for student in students_count_field.value:
var student_data = StudentData.new()
student_data.code = register_data.get_new_code()
@@ -23,6 +24,6 @@ func _on_next() -> bool:
students.append(student_data)
else:
return false
register_data.students[device_id] = students
return true
return false
@@ -200,8 +200,9 @@ func _on_stimulus_pressed(stimulus : Dictionary, _node : Node) -> bool:
var right_answer: = _get_current_stimulus()
# Handles the right answer GPs
# RA os - stimulus à
for i in right_answer.GPs.size():
if not stimulus.has("GPs") or (i <= stimulus.GPs.size() and stimulus.GPs[i] == right_answer.GPs[i]):
if not stimulus.has("GPs") or (i < stimulus.GPs.size() and stimulus.GPs[i] == right_answer.GPs[i]):
continue
_update_score(right_answer.GPs[i].ID, -1)
@@ -7,7 +7,6 @@
[ext_resource type="Texture2D" uid="uid://5bx8ugh178j1" path="res://assets/minigames/crabs/graphic/background.png" id="7_s0cgt"]
[node name="CrabsMinigame" instance=ExtResource("1_lbq56")]
process_mode = 1
script = ExtResource("2_gierf")
minigame_name = 1
lesson_nb = 67
+2 -2
View File
@@ -16,7 +16,7 @@ layout_mode = 3
anchors_preset = 0
offset_right = 400.0
offset_bottom = 400.0
scale = Vector2(1.13288, 1.13288)
scale = Vector2(1.0829, 1.0829)
script = ExtResource("1_06uwq")
[node name="BackFX" type="Control" parent="."]
@@ -69,7 +69,7 @@ unique_name_in_owner = true
scale = Vector2(2.15054, 2.15054)
sprite_frames = ExtResource("5_js27p")
animation = &"idle"
frame_progress = 0.492058
frame_progress = 0.433302
centered = false
offset = Vector2(-0.000205994, 0.00019455)
@@ -7,9 +7,8 @@
[ext_resource type="Texture2D" uid="uid://c7oq86cgq7okn" path="res://assets/minigames/jellyfish/graphic/backgroung.png" id="6_sn7hv"]
[node name="JellyfishMinigame" instance=ExtResource("1_hauef")]
process_mode = 1
script = ExtResource("2_gnjlp")
lesson_nb = 5
lesson_nb = 12
difficulty = 4
max_number_of_lives = 5
max_progression = 8