From 94849da7a707081ba0e6e3177c34566159ef735a Mon Sep 17 00:00:00 2001 From: Shomy <61943525+shomykohai@users.noreply.github.com> Date: Mon, 16 Sep 2024 18:42:06 +0200 Subject: [PATCH] Add `remove_pool` method to API --- addons/quest_system/quest_manager.gd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/quest_system/quest_manager.gd b/addons/quest_system/quest_manager.gd index 0c55a80..5530c9f 100644 --- a/addons/quest_system/quest_manager.gd +++ b/addons/quest_system/quest_manager.gd @@ -214,6 +214,12 @@ func add_new_pool(pool_path: String, pool_name: String) -> void: add_child(pool_instance) +func remove_pool(pool_name: String) -> void: + var pool := get_pool(pool_name) + if pool != null: + pool.queue_free() + + func get_pool(pool: String) -> BaseQuestPool: return get_node_or_null(pool)