diff options
Diffstat (limited to 'scene/2d/navigation_obstacle_2d.cpp')
-rw-r--r-- | scene/2d/navigation_obstacle_2d.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index 965e2b6dc1..a06f7a9fd0 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -69,17 +69,14 @@ NavigationObstacle2D::~NavigationObstacle2D() { agent = RID(); // Pointless } -String NavigationObstacle2D::get_configuration_warning() const { - String warning = Node::get_configuration_warning(); +TypedArray<String> NavigationObstacle2D::get_configuration_warnings() const { + TypedArray<String> warnings = Node::get_configuration_warnings(); if (!Object::cast_to<Node2D>(get_parent())) { - if (!warning.is_empty()) { - warning += "\n\n"; - } - warning += TTR("The NavigationObstacle2D only serves to provide collision avoidance to a Node2D object."); + warnings.push_back(TTR("The NavigationObstacle2D only serves to provide collision avoidance to a Node2D object.")); } - return warning; + return warnings; } void NavigationObstacle2D::update_agent_shape() { |