From 538be36594aac2627483c150eaa1a2624f0d073d Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Sat, 24 Feb 2024 23:05:25 +0000 Subject: [PATCH] Undo workaround for compatibility breakage in Godot 4.3, it was reverted. See https://github.com/godotengine/godot/issues/88379 --- modifiers/godot/voxel_modifier_gd.cpp | 17 ----------------- modifiers/godot/voxel_modifier_gd.h | 8 -------- .../voxel_terrain_multiplayer_synchronizer.cpp | 17 ----------------- .../voxel_terrain_multiplayer_synchronizer.h | 8 -------- terrain/instancing/voxel_instancer.cpp | 17 ----------------- terrain/instancing/voxel_instancer.h | 8 -------- terrain/voxel_node.cpp | 17 ----------------- terrain/voxel_node.h | 8 -------- 8 files changed, 100 deletions(-) diff --git a/modifiers/godot/voxel_modifier_gd.cpp b/modifiers/godot/voxel_modifier_gd.cpp index 0f6e7dda0..ac0ced89b 100644 --- a/modifiers/godot/voxel_modifier_gd.cpp +++ b/modifiers/godot/voxel_modifier_gd.cpp @@ -145,34 +145,17 @@ void VoxelModifier::_notification(int p_what) { #ifdef TOOLS_ENABLED #if defined(ZN_GODOT) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray VoxelModifier::get_configuration_warnings() const { PackedStringArray warnings; get_configuration_warnings(warnings); return warnings; } -#else -Array VoxelModifier::get_configuration_warnings() const { - PackedStringArray warnings; - get_configuration_warnings(warnings); - // TODO Eventually make use of new features introduced in Godot 4.3 - return to_array(warnings); -} -#endif #elif defined(ZN_GODOT_EXTENSION) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray VoxelModifier::_get_configuration_warnings() const { PackedStringArray warnings; get_configuration_warnings(warnings); return warnings; } -#else -Array VoxelModifier::_get_configuration_warnings() const { - PackedStringArray warnings; - get_configuration_warnings(warnings); - return to_array(warnings); -} -#endif #endif void VoxelModifier::get_configuration_warnings(PackedStringArray &warnings) const { diff --git a/modifiers/godot/voxel_modifier_gd.h b/modifiers/godot/voxel_modifier_gd.h index f98de5f12..2a9283741 100644 --- a/modifiers/godot/voxel_modifier_gd.h +++ b/modifiers/godot/voxel_modifier_gd.h @@ -32,17 +32,9 @@ class VoxelModifier : public Node3D { #ifdef TOOLS_ENABLED #if defined(ZN_GODOT) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray get_configuration_warnings() const override; -#else - Array get_configuration_warnings() const override; -#endif #elif defined(ZN_GODOT_EXTENSION) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray _get_configuration_warnings() const override; -#else - Array _get_configuration_warnings() const override; -#endif #endif virtual void get_configuration_warnings(PackedStringArray &warnings) const; #endif diff --git a/terrain/fixed_lod/voxel_terrain_multiplayer_synchronizer.cpp b/terrain/fixed_lod/voxel_terrain_multiplayer_synchronizer.cpp index 57059c0d3..71d55e2c9 100644 --- a/terrain/fixed_lod/voxel_terrain_multiplayer_synchronizer.cpp +++ b/terrain/fixed_lod/voxel_terrain_multiplayer_synchronizer.cpp @@ -237,34 +237,17 @@ void VoxelTerrainMultiplayerSynchronizer::_b_receive_area(PackedByteArray messag #ifdef TOOLS_ENABLED #if defined(ZN_GODOT) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray VoxelTerrainMultiplayerSynchronizer::get_configuration_warnings() const { PackedStringArray warnings; get_configuration_warnings(warnings); return warnings; } -#else -Array VoxelTerrainMultiplayerSynchronizer::get_configuration_warnings() const { - PackedStringArray warnings; - get_configuration_warnings(warnings); - // TODO Eventually make use of new features introduced in Godot 4.3 - return to_array(warnings); -} -#endif #elif defined(ZN_GODOT_EXTENSION) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray VoxelTerrainMultiplayerSynchronizer::_get_configuration_warnings() const { PackedStringArray warnings; get_configuration_warnings(warnings); return warnings; } -#else -Array VoxelTerrainMultiplayerSynchronizer::_get_configuration_warnings() const { - PackedStringArray warnings; - get_configuration_warnings(warnings); - return to_array(warnings); -} -#endif #endif void VoxelTerrainMultiplayerSynchronizer::get_configuration_warnings(PackedStringArray &warnings) const { diff --git a/terrain/fixed_lod/voxel_terrain_multiplayer_synchronizer.h b/terrain/fixed_lod/voxel_terrain_multiplayer_synchronizer.h index 7f67cc4f6..c7e6df51c 100644 --- a/terrain/fixed_lod/voxel_terrain_multiplayer_synchronizer.h +++ b/terrain/fixed_lod/voxel_terrain_multiplayer_synchronizer.h @@ -27,17 +27,9 @@ class VoxelTerrainMultiplayerSynchronizer : public Node { #ifdef TOOLS_ENABLED #if defined(ZN_GODOT) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray get_configuration_warnings() const override; -#else - Array get_configuration_warnings() const override; -#endif #elif defined(ZN_GODOT_EXTENSION) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray _get_configuration_warnings() const override; -#else - Array _get_configuration_warnings() const override; -#endif #endif void get_configuration_warnings(PackedStringArray &warnings) const; #endif diff --git a/terrain/instancing/voxel_instancer.cpp b/terrain/instancing/voxel_instancer.cpp index 39e2036c8..3f6dfa341 100644 --- a/terrain/instancing/voxel_instancer.cpp +++ b/terrain/instancing/voxel_instancer.cpp @@ -2016,34 +2016,17 @@ bool VoxelInstancer::debug_get_draw_flag(DebugDrawFlag flag_index) const { #ifdef TOOLS_ENABLED #if defined(ZN_GODOT) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray VoxelInstancer::get_configuration_warnings() const { PackedStringArray warnings; get_configuration_warnings(warnings); return warnings; } -#else -Array VoxelInstancer::get_configuration_warnings() const { - PackedStringArray warnings; - get_configuration_warnings(warnings); - // TODO Eventually make use of new features introduced in Godot 4.3 - return to_array(warnings); -} -#endif #elif defined(ZN_GODOT_EXTENSION) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray VoxelInstancer::_get_configuration_warnings() const { PackedStringArray warnings; get_configuration_warnings(warnings); return warnings; } -#else -Array VoxelInstancer::_get_configuration_warnings() const { - PackedStringArray warnings; - get_configuration_warnings(warnings); - return to_array(warnings); -} -#endif #endif void VoxelInstancer::get_configuration_warnings(PackedStringArray &warnings) const { diff --git a/terrain/instancing/voxel_instancer.h b/terrain/instancing/voxel_instancer.h index 55e54b705..fc9f243c7 100644 --- a/terrain/instancing/voxel_instancer.h +++ b/terrain/instancing/voxel_instancer.h @@ -115,17 +115,9 @@ class VoxelInstancer : public Node3D, public VoxelInstanceLibrary::IListener { #ifdef TOOLS_ENABLED #if defined(ZN_GODOT) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray get_configuration_warnings() const override; -#else - Array get_configuration_warnings() const override; -#endif #elif defined(ZN_GODOT_EXTENSION) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray _get_configuration_warnings() const override; -#else - Array _get_configuration_warnings() const override; -#endif #endif virtual void get_configuration_warnings(PackedStringArray &warnings) const; #endif diff --git a/terrain/voxel_node.cpp b/terrain/voxel_node.cpp index 1933bcb03..059d87765 100644 --- a/terrain/voxel_node.cpp +++ b/terrain/voxel_node.cpp @@ -68,34 +68,17 @@ Ref VoxelNode::get_voxel_tool() { #ifdef TOOLS_ENABLED #if defined(ZN_GODOT) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray VoxelNode::get_configuration_warnings() const { PackedStringArray warnings; get_configuration_warnings(warnings); return warnings; } -#else -Array VoxelNode::get_configuration_warnings() const { - PackedStringArray warnings; - get_configuration_warnings(warnings); - // TODO Eventually make use of new features introduced in Godot 4.3 - return to_array(warnings); -} -#endif #elif defined(ZN_GODOT_EXTENSION) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray VoxelNode::_get_configuration_warnings() const { PackedStringArray warnings; get_configuration_warnings(warnings); return warnings; } -#else -Array VoxelNode::_get_configuration_warnings() const { - PackedStringArray warnings; - get_configuration_warnings(warnings); - return to_array(warnings); -} -#endif #endif void VoxelNode::get_configuration_warnings(PackedStringArray &warnings) const { diff --git a/terrain/voxel_node.h b/terrain/voxel_node.h index abd59a2a4..dd6e525d7 100644 --- a/terrain/voxel_node.h +++ b/terrain/voxel_node.h @@ -48,17 +48,9 @@ class VoxelNode : public Node3D { #ifdef TOOLS_ENABLED #if defined(ZN_GODOT) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray get_configuration_warnings() const override; -#else - Array get_configuration_warnings() const override; -#endif #elif defined(ZN_GODOT_EXTENSION) -#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 2 PackedStringArray _get_configuration_warnings() const override; -#else - Array _get_configuration_warnings() const override; -#endif #endif virtual void get_configuration_warnings(PackedStringArray &warnings) const; #endif