mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-24 23:25:34 -07:00
Save and Load randomizer trick options.
This commit is contained in:
parent
2697c61b92
commit
540ef97868
1 changed files with 10 additions and 0 deletions
|
@ -469,6 +469,12 @@ void SaveManager::LoadRandomizerVersion3() {
|
|||
SaveManager::Instance->LoadData("", trialId);
|
||||
randoContext->GetTrial(trialId)->SetAsRequired();
|
||||
});
|
||||
|
||||
SaveManager::Instance->LoadArray("trickOptions", RT_MAX, [&](size_t i) {
|
||||
uint8_t value = 0;
|
||||
SaveManager::Instance->LoadData("", value);
|
||||
randoContext->GetTrickOption(RandomizerTrick(i)).Set(value);
|
||||
});
|
||||
}
|
||||
|
||||
void SaveManager::SaveRandomizer(SaveContext* saveContext, int sectionID, bool fullSave) {
|
||||
|
@ -603,6 +609,10 @@ void SaveManager::SaveRandomizer(SaveContext* saveContext, int sectionID, bool f
|
|||
SaveManager::Instance->SaveData("", i);
|
||||
}
|
||||
});
|
||||
|
||||
SaveManager::Instance->SaveArray("trickOptions", RT_MAX, [&](size_t i) {
|
||||
SaveManager::Instance->SaveData("", randoContext->GetTrickOption(RandomizerTrick(i)).Get());
|
||||
});
|
||||
}
|
||||
|
||||
// Init() here is an extension of InitSram, and thus not truly an initializer for SaveManager itself. don't put any class initialization stuff here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue