Skip to content

Commit

Permalink
Don't stop from adding new pool if the script is the same
Browse files Browse the repository at this point in the history
Also check if the name is already taken
  • Loading branch information
shomykohai committed Oct 9, 2024
1 parent 75fa13e commit 261fe96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/quest_system/quest_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ func add_new_pool(pool_path: String, pool_name: String) -> void:
var pool_instance = pool.new(pool_name)

# Make sure the pool does not exist yet
for pools in get_children():
if pool_instance.get_script() == pools.get_script():
for pools in get_all_pools():
if pool_instance.get_script() == pools.get_script() && pool_name != pools.name:
return

add_child(pool_instance)
add_child(pool_instance, true)


func remove_pool(pool_name: String) -> void:
Expand Down

0 comments on commit 261fe96

Please sign in to comment.