godot icon indicating copy to clipboard operation
godot copied to clipboard

Add some missing renames to 3to4 tool.

Open rcorre opened this issue 2 years ago • 5 comments

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.

rcorre avatar Mar 06 '23 23:03 rcorre

MultiplayerPeerExtension isn't an exact replacement for NetworkedMultiplayerCustom, but at least it gets you moving in the right direction.

Does it really? Without making an extension this class is probably not useful to instantiate, so trading errors on a known, removed class for errors on an unknown one doesn't seem useful to me.

We could add a comment as a hint for further work needed by the user if needed, but I'm not sure this class was used often enough to warrant the effort.

akien-mga avatar Mar 07 '23 07:03 akien-mga

Without making an extension this class is probably not useful to instantiate

Ah, is MultiplayerPeerExtension not useable outside an extension? I haven't looked into GDExtension much yet, but I was using NetworkedMultiplayerCustom in my project and this looked like what I'd need to use instead.

rcorre avatar Mar 07 '23 11:03 rcorre

Ah, is MultiplayerPeerExtension not useable outside an extension?

You can extend MultiplayerPeerExtension in GDScript - the Nakama addon does it:

https://github.com/heroiclabs/nakama-godot/blob/godot-4/addons/com.heroiclabs.nakama/utils/NakamaMultiplayerPeer.gd

But unlike NetworkedMultiplayerCustom you have to make a child class, you can't instance MultiplayerPeerExtension directly.

dsnopek avatar Mar 07 '23 13:03 dsnopek

Alright, sounds like it is actually helpful to go part of the way then :)

akien-mga avatar Mar 07 '23 14:03 akien-mga

But unlike NetworkedMultiplayerCustom you have to make a child class, you can't instance MultiplayerPeerExtension directly.

Ah, I'd extended NetworkedMultiplayerCustom in my godot3 project, so switching the extends to MultiplayerPeerExtension was a first step. You're right, this wouldn't make sense if someone just instantiated it. I can remove it if you'd like, or feel free to merge. Like you said, it probably isn't a commonly used class

rcorre avatar Mar 07 '23 14:03 rcorre

Thanks!

akien-mga avatar Mar 08 '23 08:03 akien-mga

Cherry-picked for 4.0.1.

YuriSizov avatar Mar 13 '23 20:03 YuriSizov