-
Notifications
You must be signed in to change notification settings - Fork 516
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
Changed all checks for !gPlayState
to `!GameInteractor::IsSaveLoade…
#3441
Changed all checks for !gPlayState
to `!GameInteractor::IsSaveLoade…
#3441
Conversation
…d()` in mods.cpp for all the cheats, and added the same full check to others that really didn't need to be running outside of a game (like infinite rupees, magic, health, etc), and clear any triggering CVars. Changed `RegisterSwitchAge()` to clear the CVar instead of setting it to 0.
One thing I'm not a big fan of with GameInteractor::IsSaveLoaded is that it prevents things from working in a non-savefile debug play state (using map select from the opening scene/file select). This is a useful and valid playstate in my mind for testing things without making/sacrificing a file slot. I'd like to see an alternate method that still prevents some things from working on the opening sequence, but does allow them in non-savefile debug mode. I don't know what this would look like yet, might have to think about it. |
agreed this has been annoying, early on I had considered trying to just add checks for the cutscene indexes instead but never got around to it |
What does that actually look like? I assume it's something about the saveNum, does it have a specific saveNum that ends up being used there that isn't used elsewhere? Maybe we could make an exception just for that? |
nit: single line if statements still need brackets |
I was pretty sure that was the one time that no-bracket if statements were allowed, but that format wasn't even my code, aside from changing things how I mentioned that was already that way XD |
Iirc the fileNum is 0xFF for both the title sequence and the debug mode. |
what if we gave |
Probably can safely use this along with the other indicators |
Do we want to make that a separate PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to change what's behind IsSaveLoaded(), we'd need everything in this PR anyway. Considering this is the part that actually fixes something, and the other thing is more a develop thing, I'd say let's get this in right now and PR the better check later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i agree with @aMannus
let's and do a follow up PR to restore/improve devex later
…d()` in mods.cpp for all the cheats, and added the same full check to others that really didn't need to be running outside of a game (like infinite rupees, magic, health, etc), and clear any triggering CVars. (HarbourMasters#3441) Changed `RegisterSwitchAge()` to clear the CVar instead of setting it to 0.
Many cheats in
mods.cpp
were merely checking for!gPlayState
to prevent running outside of a game, which isn't enough considering the title screen and demos. Using Change Age in the title screen, you could actually softlock saves that would require editing the json to remove that CVar. This changes all of those to!GameInteractor::IsSaveLoaded()
and adds checks for the same to any of the rest that have no business running outside of a loaded game (even though they were probably benign, still shouldn't be allowed to happen).Also changed
RegisterSwitchAge
to clear the CVar instead of just setting it to 0.Build Artifacts