mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-17 23:15:11 -05:00
Fix crashing when creating a new file (#3764)
This commit is contained in:
parent
81ec2805ee
commit
807b00a058
@ -1208,18 +1208,15 @@ void PatchToTMedallions() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterToTMedallionsFromItem() {
|
void RegisterToTMedallions() {
|
||||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnItemReceive>([](GetItemEntry _unused) {
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnItemReceive>([](GetItemEntry _unused) {
|
||||||
if (!CVarGetInteger("gToTMedallionsColors", 0) && gPlayState->sceneNum != SCENE_TEMPLE_OF_TIME) {
|
if (!CVarGetInteger("gToTMedallionsColors", 0) || !gPlayState || gPlayState->sceneNum != SCENE_TEMPLE_OF_TIME) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PatchToTMedallions();
|
PatchToTMedallions();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
void RegisterToTMedallionsFromScene() {
|
|
||||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int16_t sceneNum) {
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int16_t sceneNum) {
|
||||||
if (!CVarGetInteger("gToTMedallionsColors", 0) && gPlayState->sceneNum != SCENE_TEMPLE_OF_TIME) {
|
if (!CVarGetInteger("gToTMedallionsColors", 0) || sceneNum != SCENE_TEMPLE_OF_TIME) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PatchToTMedallions();
|
PatchToTMedallions();
|
||||||
@ -1257,7 +1254,6 @@ void InitMods() {
|
|||||||
RegisterAltTrapTypes();
|
RegisterAltTrapTypes();
|
||||||
RegisterRandomizerSheikSpawn();
|
RegisterRandomizerSheikSpawn();
|
||||||
RegisterRandomizedEnemySizes();
|
RegisterRandomizedEnemySizes();
|
||||||
RegisterToTMedallionsFromItem();
|
RegisterToTMedallions();
|
||||||
RegisterToTMedallionsFromScene();
|
|
||||||
NameTag_RegisterHooks();
|
NameTag_RegisterHooks();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user