Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #1133
Description
Adds support for GMS2.3+ self calls in the compiler, cherrypicked from UndertaleModTool Community Edition.
Fixed an issue where sub functions in an object should be stored in a self variable without the object function name suffix.
Example: the utmt compiler would make
gml_Script_act_gml_Object_menu_chapter_btn_Create_0
be stored inself.act_gml_Object_menu_chapter_btn_Create_0
when the original game code hadself.act
.Caveats
None
Notes
I've tested this with Submachine Legacy (2023.8), and the one from #1133 (2022.5)
How to Reproduce:
Create a function in a GlobalScript or Object code, then call that function from another function
In gamemaker (I've only tested this for 2023.8), make a function in an object, then call that function from another one in the same object