Skip to content

Conversation

@Alexejhero
Copy link
Contributor

@Alexejhero Alexejhero commented Nov 18, 2024

Changes made:

  • Removed typed for...in variables because Godot 4.1 doesn't support them
  • Downgraded some .tres to format version 3, because format version 4 isn't supported in Godot 4.1
  • Used custom function instead of type_string, which does not exist in Godot 4.1

I did a proper test in Godot 4.1 and encountered no issues.

I did not test in later versions of Godot, but I don't think there's anything here that could break.

Todos

  • _ModLoaderModHookPreProcessor.fix_method_super() erases everything after the function body, leaving only the first function in a script.
    func fix_method_super(method_name: String, func_body: RegExMatch, text: String) -> String:
    return regex_super_call.sub(
    text, "super.%s" % method_name,
    true, func_body.get_start(), func_body.get_end()
    )
  • Change the ´.fix_method_super()` fix to use Regex.sub again, and just add the rest of the string back after sub replaced the super calls.

@Alexejhero Alexejhero marked this pull request as draft November 18, 2024 16:28
@Alexejhero Alexejhero marked this pull request as ready for review November 18, 2024 16:53
@KANAjetzt KANAjetzt added this to the 4.x - 7.0.0 milestone Nov 18, 2024
@KANAjetzt KANAjetzt added the 4.x label Nov 18, 2024
Copy link
Member

@KANAjetzt KANAjetzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in 4.3 and works! Thank you!

@KANAjetzt KANAjetzt changed the title Fix support for Godot 4.1 fix: support for Godot 4.1 Nov 18, 2024
@Alexejhero

This comment was marked as off-topic.

@Alexejhero
Copy link
Contributor Author

Alexejhero commented Dec 25, 2024

Why hasn't this been merged yet? :/
I have to fix conflicts now

@Qubus0 Qubus0 added the 4.1 label Dec 26, 2024
@KANAjetzt
Copy link
Member

KANAjetzt commented Dec 29, 2024

I fixed the conflicts and added a fix for _ModLoaderModHookPreProcessor.fix_method_super() but I'm not allowed to push to your branch.

@KANAjetzt KANAjetzt mentioned this pull request Jan 4, 2025
4 tasks
@Alexejhero
Copy link
Contributor Author

Superseded by #508

@Alexejhero Alexejhero closed this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants