Fix _get_configuration_warning() is not called for scripts
This commit is contained in:
parent
ce2041391a
commit
5220c1c6e7
|
@ -249,14 +249,14 @@ Ref<BTTask> BTTask::next_sibling() const {
|
|||
}
|
||||
|
||||
String BTTask::get_configuration_warning() const {
|
||||
return String();
|
||||
String warning = "";
|
||||
if (get_script_instance() &&
|
||||
get_script_instance()->has_method(LimboStringNames::get_singleton()->_get_configuration_warning)) {
|
||||
warning = get_script_instance()->call(LimboStringNames::get_singleton()->_get_configuration_warning);
|
||||
}
|
||||
return warning;
|
||||
}
|
||||
|
||||
// Ref<Texture> BTTask::get_icon() const {
|
||||
// // FIXME: Potential problem if tools are not built.
|
||||
// return EditorNode::get_singleton()->get_class_icon(get_class(), "Object");
|
||||
// }
|
||||
|
||||
void BTTask::print_tree(int p_initial_tabs) const {
|
||||
String tabs = "--";
|
||||
for (int i = 0; i < p_initial_tabs; i++) {
|
||||
|
|
|
@ -73,7 +73,6 @@ public:
|
|||
int get_child_index(const Ref<BTTask> &p_child) const;
|
||||
Ref<BTTask> next_sibling() const;
|
||||
virtual String get_configuration_warning() const;
|
||||
// virtual Ref<Texture> get_icon() const;
|
||||
void print_tree(int p_initial_tabs = 0) const;
|
||||
|
||||
BTTask();
|
||||
|
|
|
@ -18,4 +18,5 @@ LimboStringNames::LimboStringNames() {
|
|||
updated = StaticCString::create("updated");
|
||||
_update = StaticCString::create("_update");
|
||||
state_changed = StaticCString::create("state_changed");
|
||||
_get_configuration_warning = StaticCString::create("_get_configuration_warning");
|
||||
}
|
|
@ -35,6 +35,7 @@ public:
|
|||
StringName updated;
|
||||
StringName _update;
|
||||
StringName state_changed;
|
||||
StringName _get_configuration_warning;
|
||||
};
|
||||
|
||||
#endif // LIMBO_STRING_NAMES_H
|
Loading…
Reference in New Issue