Skip to content

FINALLY fixed the issue with GlobalState blowing up when pressing F5. #666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ItsLJcool
Copy link
Contributor

This happened due to the GlobalScript in assets/data/global.hx containing the code to reset the state being non functional, I wont explain in depth but basically spamming F5 caused it to blow up GlobalScripts.

I removed ALL instances of the Source code using FlxG.keys.justPressed.F5 to a new Control Key DEBUG_RELOAD
So now you can set a custom keybind to reload states in the Options.

To reload GlobalScripts use SHIFT + DEBUG_RELOAD.

CURRENTLY THERE IS AN ISSUE, BUT IT'S FIXED IN THIS PR
once that is merged, this shouldn't cause any issues.

The issue?
It will reload twice, due to an oversight with updating the input AFTER preUpdate... but elapsed is updated before it 😭

anyways RED JUMPSCARE!!

@crowplexus crowplexus added type:bug Something isn't working type:enhancement New feature or request badge:good first issue status:reproducible A bug that was successfully reproduced (chances are that it is getting fixed) labels Jun 30, 2025
@crowplexus
Copy link
Member

I need to test this further but I'll let the rest of the team know

@ItsLJcool
Copy link
Contributor Author

oh also btw if you guys could get F5 to work for resetting substates I'd appreciate it, but I couldn't figure out how to reset the current open substate so rip

forgot I left a trace when loading up global.hx from `Assets` lol
@NexIsDumb
Copy link
Member

I mean, i think at this point we can remove the global script from base assets
i'll test this and merge it in the future if nobody does it before, tyy

@NexIsDumb
Copy link
Member

also like @SenDoesStuff was suggesting, this pr makes me more into the idea of having a developer mode in the options, for like accessing editors, some keybinds and more

@ItsLJcool
Copy link
Contributor Author

No your right, but I just kept the file in so people can notice the file structure, and if we need to add anything there lol

I mean, i think at this point we can remove the global script from base assets i'll test this and merge it in the future if nobody does it before, tyy

@NexIsDumb
Copy link
Member

NexIsDumb commented Jul 2, 2025

No your right, but I just kept the file in so people can notice the file structure, and if we need to add anything there lol

nah imo just let em use the website for that

@ItsLJcool
Copy link
Contributor Author

I was planning on making a pr on adding a Toolbox with the debug keys packaged in it, but I'm not sure if I really want to do that, but its been in my mind.

also like @SenDoesStuff was suggesting, this pr makes me more into the idea of having a developer mode in the options, for like accessing editors, some keybinds and more

@NexIsDumb
Copy link
Member

I was planning on making a pr on adding a Toolbox with the debug keys packaged in it, but I'm not sure if I really want to do that, but its been in my mind.

also like @SenDoesStuff was suggesting, this pr makes me more into the idea of having a developer mode in the options, for like accessing editors, some keybinds and more

i'll see it myself since i'll do it in dev, dw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:awaiting Awaiting response by creator of issue status:reproducible A bug that was successfully reproduced (chances are that it is getting fixed) type:bug Something isn't working type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants