more tuts
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 21s
Create tag and build when new code gets to main / Export (push) Successful in 5m8s
Create tag and build when new code gets to main / ReleaseName (push) Successful in 4s
Create tag and build when new code gets to main / Release (push) Successful in 10m59s

This commit is contained in:
2026-02-25 10:27:28 +01:00
parent 5da2aa31ab
commit 263990b086
9 changed files with 237 additions and 177 deletions

View File

@@ -17,18 +17,14 @@ func _ready() -> void:
## A fresh level list is propgated into the ItemList, and the file names are cleaned
func add_levels_to_container() -> void:
level_buttons_container.clear()
var max_level_reached := GameState.get_max_level_reached()
var level_iter := 0
for file_path in scene_lister.files:
# if level_iter > max_level_reached : break
level_iter += 1
var file_name := file_path.get_file() # e.g., "level_1.tscn"
file_name = file_name.trim_suffix(".tscn") # Remove the ".tscn" extension
file_name = file_name.replace("_", " ") # Replace underscores with spaces
file_name = file_name.capitalize() # Convert to proper case
if file_path.contains("/gyms/"): file_name = "[GYM] " + file_name
if file_path.contains("/museums/"): file_name = "[MUS] " + file_name
if file_path.contains("/zoos/"): file_name = "[ZOO] " + file_name
if file_path.contains("/gyms/"): continue # file_name = "[GYM] " + file_name
if file_path.contains("/museums/"): continue # file_name = "[MUS] " + file_name
if file_path.contains("/zoos/"): continue # file_name = "[ZOO] " + file_name
var button_name := str(file_name)
level_buttons_container.add_item(button_name)

View File

@@ -43,7 +43,7 @@ item_0/text = "1 - ExampleLevel"
[node name="SceneLister" type="Node" parent="." unique_id=149935027]
script = ExtResource("3_stdqw")
files = Array[String](["res://maps/gyms/metrics.tscn", "res://maps/levels/tuto_enemies.tscn", "res://maps/levels/tuto_movement.tscn", "res://maps/levels/tuto_sword_parry.tscn", "res://maps/zoos/grounded_flying_ennemies.tscn"])
files = Array[String](["res://maps/levels/1 - tuto_movement.tscn", "res://maps/levels/2 - tuto_sword.tscn", "res://maps/levels/3 - tuto_enemies.tscn", "res://maps/zoos/grounded_flying_ennemies.tscn", "res://maps/gyms/metrics.tscn"])
directory = "res://maps"
[connection signal="item_activated" from="Control/LevelButtonsContainer" to="." method="_on_level_buttons_container_item_activated"]