diff options
author | Nathan Franke <natfra@pm.me> | 2020-10-29 05:01:28 -0500 |
---|---|---|
committer | Nathan Franke <natfra@pm.me> | 2021-04-11 23:25:38 -0500 |
commit | 2a8c59c171e609d739dcc59d15e3e205dbf47cde (patch) | |
tree | c84f0fbf2fc87ce29338f31dc4a86c7bcc0d5253 /scene/3d/vehicle_body_3d.cpp | |
parent | 4a1f2dcb746af43dcebeb241276adfb5d99c1020 (diff) |
Use Array for node configuration warnings
Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
Diffstat (limited to 'scene/3d/vehicle_body_3d.cpp')
-rw-r--r-- | scene/3d/vehicle_body_3d.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index 5b0b3b89d3..edd58347f0 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -102,17 +102,14 @@ void VehicleWheel3D::_notification(int p_what) { } } -String VehicleWheel3D::get_configuration_warning() const { - String warning = Node3D::get_configuration_warning(); +TypedArray<String> VehicleWheel3D::get_configuration_warnings() const { + TypedArray<String> warnings = Node::get_configuration_warnings(); if (!Object::cast_to<VehicleBody3D>(get_parent())) { - if (!warning.is_empty()) { - warning += "\n\n"; - } - warning += TTR("VehicleWheel3D serves to provide a wheel system to a VehicleBody3D. Please use it as a child of a VehicleBody3D."); + warnings.push_back(TTR("VehicleWheel3D serves to provide a wheel system to a VehicleBody3D. Please use it as a child of a VehicleBody3D.")); } - return warning; + return warnings; } void VehicleWheel3D::_update(PhysicsDirectBodyState3D *s) { |