From 6b17c2b6e79adfbcd349ac16e1a1d31098562bc5 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Mon, 6 Mar 2023 18:16:35 -0500 Subject: [PATCH] Add some missing renames to 3to4 tool. MultiplayerPeerExtension isn't an exact replacement for NetworkedMultiplayerCustom, but at least it gets you moving in the right direction. Engine.editor_hint couldn't be fixed by the renames map, because you have to add a `()` at the end. --- editor/project_converter_3_to_4.cpp | 4 ++++ editor/renames_map_3_to_4.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp index a1dfbac719f..97b3a11adf7 100644 --- a/editor/project_converter_3_to_4.cpp +++ b/editor/project_converter_3_to_4.cpp @@ -2268,6 +2268,10 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai if (line.contains("_unhandled_key_input(event: InputEventKey)")) { line = line.replace("_unhandled_key_input(event: InputEventKey)", "_unhandled_key_input(event: InputEvent)"); } + + if (line.contains("Engine.editor_hint")) { + line = line.replace("Engine.editor_hint", "Engine.is_editor_hint()"); + } } void ProjectConverter3To4::process_csharp_line(String &line, const RegExContainer ®_container) { diff --git a/editor/renames_map_3_to_4.cpp b/editor/renames_map_3_to_4.cpp index eb63a244a66..b956930c0ed 100644 --- a/editor/renames_map_3_to_4.cpp +++ b/editor/renames_map_3_to_4.cpp @@ -1082,6 +1082,7 @@ const char *RenamesMap3To4::gdscript_properties_renames[][2] = { { "files_disabled", "file_disabled_color" }, // Theme { "folder_icon_modulate", "folder_icon_color" }, // Theme { "global_rate_scale", "playback_speed_scale" }, // AudioServer + { "global_translation", "global_position" }, // Node3D { "gravity_distance_scale", "gravity_point_unit_distance" }, // Area(2D/3D) { "gravity_vec", "gravity_direction" }, // Area(2D/3D) { "hint_tooltip", "tooltip_text" }, // Control @@ -1476,6 +1477,7 @@ const char *RenamesMap3To4::class_renames[][2] = { { "CubeMesh", "BoxMesh" }, { "CylinderShape", "CylinderShape3D" }, { "DirectionalLight", "DirectionalLight3D" }, + { "Directory", "DirAccess" }, { "DynamicFont", "FontFile" }, { "DynamicFontData", "FontFile" }, { "EditorNavigationMeshGenerator", "NavigationMeshGenerator" }, @@ -1518,6 +1520,7 @@ const char *RenamesMap3To4::class_renames[][2] = { { "NavigationPolygonInstance", "NavigationRegion2D" }, { "NavigationRegion", "NavigationRegion3D" }, { "NavigationServer", "NavigationServer3D" }, + { "NetworkedMultiplayerCustom", "MultiplayerPeerExtension" }, { "NetworkedMultiplayerENet", "ENetMultiplayerPeer" }, { "NetworkedMultiplayerPeer", "MultiplayerPeer" }, { "Occluder", "OccluderInstance3D" },