Update all get_configuration_warning to retrieve warnings from the parent
This commit is contained in:
parent
00949f0c5f
commit
9fc2b0fddc
40 changed files with 284 additions and 114 deletions
|
|
@ -106,11 +106,16 @@ Node *NavigationObstacle2D::get_navigation_node() const {
|
|||
}
|
||||
|
||||
String NavigationObstacle2D::get_configuration_warning() const {
|
||||
String warning = Node::get_configuration_warning();
|
||||
|
||||
if (!Object::cast_to<Node2D>(get_parent())) {
|
||||
return TTR("The NavigationObstacle2D only serves to provide collision avoidance to a Node2D object.");
|
||||
if (!warning.empty()) {
|
||||
warning += "\n\n";
|
||||
}
|
||||
warning += TTR("The NavigationObstacle2D only serves to provide collision avoidance to a Node2D object.");
|
||||
}
|
||||
|
||||
return String();
|
||||
return warning;
|
||||
}
|
||||
|
||||
void NavigationObstacle2D::update_agent_shape() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue