Run godot --convert-3to4 (automated conversion)

Apply Godot 4.6 automated conversion: renames Spatial.translate->position,
margin_*->offset_*, tool->@tool, .empty()->.is_empty(), DynamicFont->FontFile,
onready->@onready, export()->@export, and many more.

127 files changed by the tool. Manual fixes still required for:
 - godot_db_manager plugin (incompatible APIs: WindowDialog, Tabs, etc.)
 - lod plugin (Spatial -> Node3D renames)
 - ResourceLoader.load_interactive removed -> load_threaded_request
 - OS.set_window_fullscreen removed -> DisplayServer
 - Viewport.set_size_override removed

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vaillant Jeremy
2026-05-16 19:18:27 +02:00
parent efa35a444a
commit 01ea3af253
127 changed files with 2262 additions and 2258 deletions
+17 -17
View File
@@ -1,10 +1,10 @@
@tool
"""
class GDDBTableCell
"""
class_name GDDBTableCell
tool
extends Control
signal edit_data
@@ -20,16 +20,16 @@ var m_row_idx : int = -1
var m_text : String = ""
func _ready() -> void :
$LineEdit.connect("text_changed", self, "on_text_changed")
$LineEdit/edit_btn.connect("pressed", self, "on_edit_string")
$LineEdit.connect("text_changed", Callable(self, "on_text_changed"))
$LineEdit/edit_btn.connect("pressed", Callable(self, "on_edit_string"))
$Button.connect("pressed", self, "on_button_pressed")
$Button.connect("pressed", Callable(self, "on_button_pressed"))
$Button.set_clip_text(true)
$CheckBox.connect("toggled", self, "on_toggle_button")
$CheckBox.connect("toggled", Callable(self, "on_toggle_button"))
func _exit_tree() -> void :
$LineEdit.disconnect("text_changed", self, "on_text_changed")
$LineEdit.disconnect("text_changed", Callable(self, "on_text_changed"))
# sets the property id
func set_prop_id(id : int) -> void :
@@ -137,10 +137,10 @@ func on_edit_string() -> void :
# called when edit the data
func on_text_changed(new_text : String) -> void :
if(new_text.empty()):
if(new_text.is_empty()):
m_text = ""
$LineEdit.set_text(m_text)
$LineEdit.set_cursor_position(0)
$LineEdit.set_caret_column(0)
return
if(m_prop_type == gddb_types.e_prop_type_int):
@@ -163,25 +163,25 @@ func check_integer(text : String) -> bool :
is_negative = true
# check if the current string is only "-"
if(text.empty()):
if(text.is_empty()):
m_text = "-"
$LineEdit.set_text(m_text)
$LineEdit.set_cursor_position(m_text.length())
$LineEdit.set_caret_column(m_text.length())
return true
if(text.is_valid_integer()):
if(text.is_valid_int()):
if(text.begins_with("0")):
# a negative integer cannot start with "0"
if(is_negative):
m_text = "-"
$LineEdit.set_text(m_text)
$LineEdit.set_cursor_position(1)
$LineEdit.set_caret_column(1)
return true
# a positive number starting with "0" can be only "0"
m_text = "0"
$LineEdit.set_text(m_text)
$LineEdit.set_cursor_position(1)
$LineEdit.set_caret_column(1)
return true
# don't add more "-" in front of the number
@@ -195,11 +195,11 @@ func check_integer(text : String) -> bool :
m_text = text
$LineEdit.set_text(m_text)
$LineEdit.set_cursor_position(m_text.length())
$LineEdit.set_caret_column(m_text.length())
return true
$LineEdit.set_text(m_text)
$LineEdit.set_cursor_position(m_text.length())
$LineEdit.set_caret_column(m_text.length())
return false
func check_float(text : String) -> bool :
@@ -210,12 +210,12 @@ func check_float(text : String) -> bool :
|| text.begins_with("09")):
m_text = "0"
$LineEdit.set_text(m_text)
$LineEdit.set_cursor_position(1)
$LineEdit.set_caret_column(1)
return true
m_text = text
return true
$LineEdit.set_text(m_text)
$LineEdit.set_cursor_position(m_text.length())
$LineEdit.set_caret_column(m_text.length())
return false