replace string with string name for collectible_id

This commit is contained in:
2026-04-16 16:11:07 +02:00
parent a51e94d4d3
commit 08c283d76a
6 changed files with 20 additions and 16 deletions

View File

@@ -20,7 +20,7 @@ func setup() -> void:
if unlocked_collectible_ids.has(collectible.id):
_unlock_collectible(collectible.id)
func on_collectible_unlocked(collectible_id: String) -> void:
func on_collectible_unlocked(collectible_id: StringName) -> void:
_unlock_collectible(collectible_id)
func _add_collectible(collectible: CollectibleResource) -> void:
@@ -28,7 +28,7 @@ func _add_collectible(collectible: CollectibleResource) -> void:
collectible_ui.setup(collectible)
grid_container.add_child(collectible_ui)
func _unlock_collectible(collectible_id: String) -> void:
func _unlock_collectible(collectible_id: StringName) -> void:
for collectible_ui in grid_container.get_children():
if collectible_ui.collectible_resource.id == collectible_id:
collectible_ui.unlock()