mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 22:03:36 -07:00
Added "OnRandomizerGeneration" Hook.
* It is executed on Randomizer Generation.
This commit is contained in:
parent
d8e90a701c
commit
1ec4ca4344
4 changed files with 9 additions and 6 deletions
|
@ -62,6 +62,7 @@ DEFINE_HOOK(OnUpdateFileLanguageSelection, (uint8_t optionIndex));
|
||||||
DEFINE_HOOK(OnUpdateFileQuestSelection, (uint8_t questIndex));
|
DEFINE_HOOK(OnUpdateFileQuestSelection, (uint8_t questIndex));
|
||||||
DEFINE_HOOK(OnUpdateFileBossRushOptionSelection, (uint8_t optionIndex, uint8_t optionValue));
|
DEFINE_HOOK(OnUpdateFileBossRushOptionSelection, (uint8_t optionIndex, uint8_t optionValue));
|
||||||
DEFINE_HOOK(OnUpdateFileNameSelection, (int16_t charCode));
|
DEFINE_HOOK(OnUpdateFileNameSelection, (int16_t charCode));
|
||||||
|
DEFINE_HOOK(OnRandomizerGeneration, ());
|
||||||
|
|
||||||
DEFINE_HOOK(OnSetGameLanguage, ());
|
DEFINE_HOOK(OnSetGameLanguage, ());
|
||||||
DEFINE_HOOK(OnFileDropped, (std::string filePath));
|
DEFINE_HOOK(OnFileDropped, (std::string filePath));
|
||||||
|
|
|
@ -274,6 +274,10 @@ void GameInteractor_ExecuteOnUpdateFileNameSelection(int16_t charCode) {
|
||||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnUpdateFileNameSelection>(charCode);
|
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnUpdateFileNameSelection>(charCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameInteractor_ExecuteOnRandomizerGeneration() {
|
||||||
|
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnRandomizerGeneration>();
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: - Game
|
// MARK: - Game
|
||||||
|
|
||||||
void GameInteractor_ExecuteOnSetGameLanguage() {
|
void GameInteractor_ExecuteOnSetGameLanguage() {
|
||||||
|
|
|
@ -69,6 +69,7 @@ void GameInteractor_ExecuteOnUpdateFileLanguageSelection(uint8_t optionIndex);
|
||||||
void GameInteractor_ExecuteOnUpdateFileQuestSelection(uint8_t questIndex);
|
void GameInteractor_ExecuteOnUpdateFileQuestSelection(uint8_t questIndex);
|
||||||
void GameInteractor_ExecuteOnUpdateFileBossRushOptionSelection(uint8_t optionIndex, uint8_t optionValue);
|
void GameInteractor_ExecuteOnUpdateFileBossRushOptionSelection(uint8_t optionIndex, uint8_t optionValue);
|
||||||
void GameInteractor_ExecuteOnUpdateFileNameSelection(int16_t charCode);
|
void GameInteractor_ExecuteOnUpdateFileNameSelection(int16_t charCode);
|
||||||
|
void GameInteractor_ExecuteOnRandomizerGeneration();
|
||||||
|
|
||||||
// MARK: - Game
|
// MARK: - Game
|
||||||
void GameInteractor_ExecuteOnSetGameLanguage();
|
void GameInteractor_ExecuteOnSetGameLanguage();
|
||||||
|
|
|
@ -3611,12 +3611,9 @@ bool GenerateRandomizer(std::string seed /*= ""*/) {
|
||||||
}
|
}
|
||||||
if (CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) == 0) {
|
if (CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) == 0) {
|
||||||
randoThread = std::thread(&GenerateRandomizerImgui, seed);
|
randoThread = std::thread(&GenerateRandomizerImgui, seed);
|
||||||
if (CVarGetInteger(CVAR_AUDIO("RandomizeAllOnNewRandoGen"), 0) == 1) {
|
|
||||||
AudioEditor_RandomizeAll();
|
GameInteractor_ExecuteOnRandomizerGeneration();
|
||||||
}
|
|
||||||
if (CVarGetInteger(CVAR_COSMETIC("RandomizeAllOnNewRandoGen"), 0) == 1) {
|
|
||||||
CosmeticsEditor_RandomizeAll();
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue