Skip to content

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

@ItsLJcool
Copy link
Contributor Author

ItsLJcool commented Jul 4, 2025

#14 cne flixel branch merged, testing new commit

@ItsLJcool
Copy link
Contributor Author

ok pr should be good to go.

Currently Reloading SubStates won't work because of overriding new functions, so it would be a weird fix to make it work, and that fix will break or be annoying to maintain, so until we can find a better one, reloading States should just be fine for now.

@NexIsDumb
Copy link
Member

lemme check

@ItsLJcool
Copy link
Contributor Author

ooh wait @NexIsDumb should we quickly add a keybind for console debug?

@ItsLJcool
Copy link
Contributor Author

or whole other pr?

@NexIsDumb
Copy link
Member

ooh wait @NexIsDumb should we quickly add a keybind for console debug?

nah i'll do smth like in dev as I've already planned

@NexIsDumb NexIsDumb merged commit 07ae6b6 into CodenameCrew:main Jul 4, 2025
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

4 participants