From 7906a493efae7765b18fc3ebe19e0cdc814dfac7 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 27 Jul 2023 13:52:29 +0200 Subject: [PATCH] BTTask: Don't show `elapsed_time` in inspector. --- bt/bt_task.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bt/bt_task.cpp b/bt/bt_task.cpp index 7b08099..6d4bea1 100644 --- a/bt/bt_task.cpp +++ b/bt/bt_task.cpp @@ -303,12 +303,12 @@ void BTTask::_bind_methods() { ClassDB::bind_method(D_METHOD("get_elapsed_time"), &BTTask::get_elapsed_time); ADD_PROPERTY(PropertyInfo(Variant::STRING, "custom_name"), "set_custom_name", "get_custom_name"); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "agent", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "set_agent", "get_agent"); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "blackboard", PROPERTY_HINT_RESOURCE_TYPE, "Blackboard", 0), "", "get_blackboard"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "agent", PROPERTY_HINT_RESOURCE_TYPE, "Node", PROPERTY_USAGE_NONE), "set_agent", "get_agent"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "blackboard", PROPERTY_HINT_RESOURCE_TYPE, "Blackboard", PROPERTY_USAGE_NONE), "", "get_blackboard"); // ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "parent", PROPERTY_HINT_RESOURCE_TYPE, "BTTask", 0), "", "get_parent"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "children", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_children", "_get_children"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "status", PROPERTY_HINT_NONE, "", 0), "", "get_status"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "elapsed_time"), "", "get_elapsed_time"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "status", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "", "get_status"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "elapsed_time", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "", "get_elapsed_time"); GDVIRTUAL_BIND(_setup); GDVIRTUAL_BIND(_enter);