Fix: Weird name showing on the tasks

This commit is contained in:
Serhii Snitsaruk 2024-01-09 22:06:56 +01:00
parent c1d0353798
commit 966199e8dc
2 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,7 @@ String BTTask::_generate_name() {
#endif // LIMBOAI_MODULE #endif // LIMBOAI_MODULE
#ifdef LIMBOAI_GDEXTENSION #ifdef LIMBOAI_GDEXTENSION
if (!get_path().is_empty()) { if (IS_RESOURCE_FILE(get_path())) {
return get_path().get_basename().get_file().trim_prefix("BT").to_pascal_case(); return get_path().get_basename().get_file().trim_prefix("BT").to_pascal_case();
} }
return get_class().trim_prefix("BT"); return get_class().trim_prefix("BT");

View File

@ -146,6 +146,7 @@ inline void VARIANT_DELETE_IF_OBJECT(Variant m_variant) {
} }
#define PROJECT_CONFIG_FILE() GET_PROJECT_SETTINGS_DIR().path_join("limbo_ai.cfg") #define PROJECT_CONFIG_FILE() GET_PROJECT_SETTINGS_DIR().path_join("limbo_ai.cfg")
#define IS_RESOURCE_FILE(m_path) (m_path.begins_with("res://") && m_path.find("::") == -1)
void SHOW_DOC(const String &p_topic); void SHOW_DOC(const String &p_topic);