Closed ephread closed 1 year ago
This script might also be useful, although I wouldn't run it on the codebase as-is. https://gist.github.com/aaronfranke/79b424226475d277d0035b7835b09c5f
I converted the entire project to Godot 4 using the built-in tool, and here are some notable things I encountered:
@Jummit perfect, thanks for investigating this. Did you push the conversion somewhere? I'm really curious to see what it looks like and if it maintains member orders.
I still need to land a couple of things in main
before starting the conversion. I want prevent the Godot 3.x and the Godot 4.x versions of inkgd from diverging too much, but it's pretty close to being done.
We should be able to start the migration soon.
Seems that "minimum_size" was changed to "custom_minimum_size"
- Cyclic references are still a problem sadly
I currently have cyclic dependencies in scripts using class_name, so it seems like it's working! I think this would simplify a lot of the codebase.
Gave this a shot again.
I removed the get_class
functions and used the is
operator in is_ink_class
. This works, but a lot of code needs to be replaced to use class references instead of strings.
static func is_ink_class(object, name_of_class: GDScript) -> bool:
return (object is Object) && object.get_script() == name_of_class
All the "imports" can be removed, as cyclic references are now possible.
Setters and getters are interesting, I think they work different than before. In 3.5 you could use the .
syntax to use the getter, now it uses it by default. I think this is the main cause for issues at the moment.
Maybe I'll try again another time, but it's too tedious for me at the moment.
Closed in favour of #75.
This PR tracks the changes required to run inkgd in Godot 4. (Also see #55)
Global
@tool
and@onready
).continue
,assert
ornull
.super
keyword in front of unqualified.
accesses.Reference
byRefCounted
.Array.remove()
byArray.remove_at()
Runtime
JSON.parse()
logic by an instance ofJSON
.Variant.Type
enum values in InkUtils.Editor Plugin
obj.funcA.connect(funcB)
).get_icon
toget_theme_icon
.OS.execute
.PoolStringArray
byPackedStringArray
.PackedScene.instance()
byPackedScene.instantiate()
.LineEdit
connections.Label.add_font_override()
calls and useLabel.font
property instead.