From 99066de39b8d9b161d63d13e582d9e07eb5cae47 Mon Sep 17 00:00:00 2001 From: JHDev2006 Date: Sat, 20 Sep 2025 18:39:14 +0100 Subject: [PATCH] changed the difficulty stars to be skulls instead, to better reflect how LSS handles stars --- Assets/Sprites/UI/DifficultyStars.png | Bin 252 -> 277 bytes Scripts/UI/CustomLevelContainer.gd | 12 ++++++++---- Scripts/UI/CustomLevelList.gd | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Assets/Sprites/UI/DifficultyStars.png b/Assets/Sprites/UI/DifficultyStars.png index 5c80918e62f170d8426304925fb66b3d25bd62c3..c66bbced219588ba72b1e306a6f3972bf1f74bf5 100644 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp^8bHj!!3HF|gZ4%PDaPU;cPEB*=VV?2Ip;lH978O6 z&raGcc*sD&C45x_-;{tx<)l*uvQr#o^_pj#5S_4s*~;MJy{emuTQ=7{kPqh?^QFu-2Nu}OU?I}7VqAzW-s@CSMn6KXn1j_k-6iXEDB@w z?x}AtuFdJsORX-^zTJ50+o^`+$U7G|>g2H=-?T$i=Jcbmf-{fT37&dfYSDlFp-o)- z=L*?#k3&lgm_J(;pLaa}>WnRWuj!_~f`83?&+T8psmb-R_KBA#*IV)~PXv06!PC{x JWt~$(69DkCd#nHe literal 252 zcmeAS@N?(olHy`uVBq!ia0vp^3P8-k!3HE}wEkTWq!^2X+?^QKos)S9a~60+7BevL9R^{> void: update_visuals() func update_visuals() -> void: - %LevelIcon.texture = ResourceSetter.get_resource(ICON_TEXTURES[level_time]) - %LevelIcon.region_rect = THEME_RECTS[level_theme] + if is_downloaded: + %LevelIcon.texture = ImageTexture.create_from_image(Image.load_from_file("user://custom_levels/downloaded/thumbnails/" + level_id + ".png")) + else: + %LevelIcon.texture = ResourceSetter.get_resource(ICON_TEXTURES[level_time]) + %LevelIcon.region_rect = THEME_RECTS[level_theme] %LevelName.text = level_name if level_name != "" else "(Unnamed Level)" %LevelAuthor.text = "By " + (level_author if level_author != "" else "Player") @@ -64,7 +68,7 @@ func update_visuals() -> void: var idx := 0 for i in %DifficultyStars.get_children(): - i.region_rect.position.x = 24 if idx > difficulty else [0, 0, 8, 8, 16][difficulty] + i.region_rect.position.x = 32 if idx > difficulty else [0, 8, 8, 16, 24][difficulty] idx += 1 func _process(_delta: float) -> void: diff --git a/Scripts/UI/CustomLevelList.gd b/Scripts/UI/CustomLevelList.gd index 77dcddb..eceed53 100644 --- a/Scripts/UI/CustomLevelList.gd +++ b/Scripts/UI/CustomLevelList.gd @@ -57,6 +57,9 @@ func get_levels(path := "user://custom_levels") -> void: file.close() var data = json["Levels"][0]["Data"].split("=") var info = json["Info"] + container.is_downloaded = path.contains("/downloaded/") + if container.is_downloaded: + container.level_id = path.get_file().replace(".lvl", "") container.level_name = info["Name"] container.level_author = info["Author"] container.level_desc = info["Description"]