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:
@@ -5,7 +5,7 @@ var current_material = null
|
||||
func level_hud_slide(node):
|
||||
var animation = Animation.new()
|
||||
var track_index = animation.add_track(Animation.TYPE_BEZIER)
|
||||
var node_element = String(node.get_path()) + ":rect_position:x"
|
||||
var node_element = String(node.get_path()) + ":position:x"
|
||||
|
||||
animation.track_set_path(track_index, node_element)
|
||||
animation.bezier_track_insert_key(track_index, 0.0, 0.0, Vector2(-0.25, 0), Vector2(0.031, 190.492))
|
||||
@@ -16,7 +16,7 @@ func level_hud_slide(node):
|
||||
func level_hud_warning(node):
|
||||
var animation = Animation.new()
|
||||
var track_index = animation.add_track(Animation.TYPE_BEZIER)
|
||||
var node_element = String(node.get_path()) + ":rect_position:x"
|
||||
var node_element = String(node.get_path()) + ":position:x"
|
||||
|
||||
animation.track_set_path(track_index, node_element)
|
||||
animation.bezier_track_insert_key(track_index, 0.0, 0.0, Vector2(-0.25, 0), Vector2(0, 78.1))
|
||||
@@ -34,4 +34,4 @@ func start_dissolve(node, material):
|
||||
node.start()
|
||||
|
||||
func animate_dissolve(progress: float) -> void:
|
||||
current_material.set_shader_param("dissolve_amount", ease(progress, 0.4))
|
||||
current_material.set_shader_parameter("dissolve_amount", ease(progress, 0.4))
|
||||
|
||||
+13
-13
@@ -2,13 +2,13 @@ extends Control
|
||||
|
||||
const TICKS_TIME_MAX = 100 # msec
|
||||
|
||||
onready var current_scene = null
|
||||
onready var current_scene_int = null
|
||||
onready var loader = null
|
||||
onready var wait_frames = 1
|
||||
onready var database = null
|
||||
onready var loaded = false
|
||||
onready var animation = Loading.get_node("AnimLoading")
|
||||
@onready var current_scene = null
|
||||
@onready var current_scene_int = null
|
||||
@onready var loader = null
|
||||
@onready var wait_frames = 1
|
||||
@onready var database = null
|
||||
@onready var loaded = false
|
||||
@onready var animation = Loading.get_node("AnimLoading")
|
||||
|
||||
func _ready():
|
||||
database = load("res://scripts/Database.gd").new().initialize()
|
||||
@@ -17,12 +17,12 @@ func _ready():
|
||||
_initialize_loading_scene()
|
||||
|
||||
func _initialize_loading_scene():
|
||||
animation.connect("animation_started", Event, "_loading_is_started")
|
||||
animation.connect("animation_finished", Event, "_loading_is_finished")
|
||||
animation.connect("animation_started", Callable(Event, "_loading_is_started"))
|
||||
animation.connect("animation_finished", Callable(Event, "_loading_is_finished"))
|
||||
|
||||
func goto_scene(path):
|
||||
print("[global#goto_scene] : load scene "+String(path))
|
||||
loader = ResourceLoader.load_interactive(path)
|
||||
loader = ResourceLoader.load_threaded_request(path)
|
||||
if loader == null:
|
||||
print("Error loading ....")
|
||||
return
|
||||
@@ -43,10 +43,10 @@ func _process(_delta):
|
||||
if wait_frames > 0:
|
||||
wait_frames -= 1
|
||||
|
||||
var tick = OS.get_ticks_msec()
|
||||
var tick = Time.get_ticks_msec()
|
||||
|
||||
# Use "TICKS_TIME_MAX" to control for how long we block this thread
|
||||
while OS.get_ticks_msec() < tick + TICKS_TIME_MAX:
|
||||
while Time.get_ticks_msec() < tick + TICKS_TIME_MAX:
|
||||
if loaded:
|
||||
var err = loader.poll()
|
||||
|
||||
@@ -75,6 +75,6 @@ func _update_progress():
|
||||
func _set_new_scene():
|
||||
var resource = loader.get_resource()
|
||||
loader = null
|
||||
current_scene = resource.instance()
|
||||
current_scene = resource.instantiate()
|
||||
get_node("/root").add_child(current_scene)
|
||||
Loading.hide()
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
extends Node
|
||||
|
||||
onready var setting = load("res://db/MSetting.gd").new()
|
||||
@onready var setting = load("res://db/MSetting.gd").new()
|
||||
|
||||
func _ready():
|
||||
apply_language(translate_int_to_locale(get_setting_language()))
|
||||
@@ -24,10 +24,10 @@ func translate_int_to_locale(id):
|
||||
func apply_resolution():
|
||||
var screen_size = Vector2(get_setting_resolution()[0], get_setting_resolution()[1])
|
||||
var margin_size = Vector2(0, 0)
|
||||
get_viewport().set_size_override(true, screen_size, margin_size)
|
||||
get_viewport().set_size_2d_override(true, screen_size, margin_size)
|
||||
|
||||
func apply_fullscreen():
|
||||
OS.set_window_fullscreen(get_setting_fullscreen())
|
||||
get_window().mode = Window.MODE_EXCLUSIVE_FULLSCREEN if (get_setting_fullscreen()) else Window.MODE_WINDOWED
|
||||
|
||||
func get_setting_language():
|
||||
return setting.get_langue()
|
||||
|
||||
Reference in New Issue
Block a user