summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Roden-Corrent <ryan@rcorre.net>2023-03-06 18:16:35 -0500
committerYuri Sizov <yuris@humnom.net>2023-03-13 21:32:51 +0100
commit81f49966834daaa7f2daef7be974f3cbcd039d34 (patch)
treec41f2a82e9fc9d2476e92b276bc5aba42bb8c6aa
parent06e2c6ace221f7e9a8591cf97339e3a6c530d86a (diff)
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. (cherry picked from commit 6b17c2b6e79adfbcd349ac16e1a1d31098562bc5)
-rw-r--r--editor/project_converter_3_to_4.cpp4
-rw-r--r--editor/renames_map_3_to_4.cpp3
2 files changed, 7 insertions, 0 deletions
diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp
index a1dfbac719..97b3a11adf 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 &reg_container) {
diff --git a/editor/renames_map_3_to_4.cpp b/editor/renames_map_3_to_4.cpp
index 3c61b81e5d..f7c135bf38 100644
--- a/editor/renames_map_3_to_4.cpp
+++ b/editor/renames_map_3_to_4.cpp
@@ -1084,6 +1084,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
@@ -1478,6 +1479,7 @@ const char *RenamesMap3To4::class_renames[][2] = {
{ "CubeMesh", "BoxMesh" },
{ "CylinderShape", "CylinderShape3D" },
{ "DirectionalLight", "DirectionalLight3D" },
+ { "Directory", "DirAccess" },
{ "DynamicFont", "FontFile" },
{ "DynamicFontData", "FontFile" },
{ "EditorNavigationMeshGenerator", "NavigationMeshGenerator" },
@@ -1520,6 +1522,7 @@ const char *RenamesMap3To4::class_renames[][2] = {
{ "NavigationPolygonInstance", "NavigationRegion2D" },
{ "NavigationRegion", "NavigationRegion3D" },
{ "NavigationServer", "NavigationServer3D" },
+ { "NetworkedMultiplayerCustom", "MultiplayerPeerExtension" },
{ "NetworkedMultiplayerENet", "ENetMultiplayerPeer" },
{ "NetworkedMultiplayerPeer", "MultiplayerPeer" },
{ "Occluder", "OccluderInstance3D" },