diff --git a/bt/tasks/bt_task.cpp b/bt/tasks/bt_task.cpp index f246130..d65bac3 100644 --- a/bt/tasks/bt_task.cpp +++ b/bt/tasks/bt_task.cpp @@ -51,27 +51,20 @@ void BT::_bind_methods() { } String BTTask::_generate_name() { -#ifdef LIMBOAI_MODULE - if (get_script_instance()) { - if (get_script_instance()->has_method(LimboStringNames::get_singleton()->_generate_name)) { - ERR_FAIL_COND_V_MSG(!get_script_instance()->get_script()->is_tool(), "ERROR: not a tool script", "Task script should be a \"tool\" script!"); - return get_script_instance()->call(LimboStringNames::get_singleton()->_generate_name); - } - String script_path = get_script_instance()->get_script()->get_path(); - if (!script_path.is_empty()) { - // Generate name based on script file - return script_path.get_basename().get_file().trim_prefix("BT").to_pascal_case(); - } - } - return get_class().trim_prefix("BT"); -#endif // LIMBOAI_MODULE + String ret; -#ifdef LIMBOAI_GDEXTENSION - if (IS_RESOURCE_FILE(get_path())) { - return get_path().get_basename().get_file().trim_prefix("BT").to_pascal_case(); + // Generate name based on script path. + Ref