-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crashing when items don't make sense Fix trials not giving you items Fix tasks taking extra time for no reason
- Loading branch information
Showing
9 changed files
with
29 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
#include <randomizer.h> | ||
|
||
#include <Modloader/app/methods/RaceHandler.h> | ||
#include <Modloader/interception_macros.h> | ||
#include <Modloader/app/methods/RaceBaseState.h> | ||
#include <Modloader/app/methods/RaceSystem.h> | ||
#include <Modloader/app/types/RaceSystem.h> | ||
|
||
bool is_in_trial = false; | ||
|
||
namespace { | ||
IL2CPP_INTERCEPT(RaceHandler, void, SetRaceInProgressState, (app::RaceHandler * this_ptr, bool in_progress)) { | ||
is_in_trial = in_progress; | ||
randomizer::game_seed().prevent_grants(is_in_trial); | ||
next::RaceHandler::SetRaceInProgressState(this_ptr, in_progress); | ||
} | ||
auto on_ready = modloader::event_bus().register_handler(ModloaderEvent::GameReady, [](auto) { | ||
randomizer::game_seed().prevent_grants([]() { | ||
return RaceSystem::get_IsRunningRace(types::RaceSystem::get_class()->static_fields->_Instance_k__BackingField); | ||
}); | ||
}); | ||
} // namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters