From ce5f0121013f186fd211f75af34ec13ed5d12e3a Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sun, 2 Jun 2024 21:59:55 +0200 Subject: [PATCH] Fix sticky name issues in custom tasks due to script errors --- bt/tasks/bt_task.cpp | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/bt/tasks/bt_task.cpp b/bt/tasks/bt_task.cpp index 4fa7ef1..818999b 100644 --- a/bt/tasks/bt_task.cpp +++ b/bt/tasks/bt_task.cpp @@ -118,31 +118,31 @@ bool BTTask::is_displayed_collapsed() const { } String BTTask::get_task_name() { - if (data.custom_name.is_empty()) { -#ifdef LIMBOAI_MODULE - if (get_script_instance() && get_script_instance()->has_method(LW_NAME(_generate_name))) { - if (unlikely(!get_script_instance()->get_script()->is_tool())) { - ERR_PRINT(vformat("BTTask: Task script should be a \"tool\" script!")); - } else { - return get_script_instance()->call(LimboStringNames::get_singleton()->_generate_name); - } - } - return _generate_name(); -#elif LIMBOAI_GDEXTENSION - Ref