Explicitly clears the entire ItemLocations array. (#3820)

This commit is contained in:
Christopher Leggett 2024-01-08 09:37:10 -05:00 committed by GitHub
commit 63413e8159
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View file

@ -226,6 +226,12 @@ std::vector<RandomizerCheck> Context::GetLocations(const std::vector<RandomizerC
return locationsInCategory;
}
void Context::ClearItemLocations() {
for (int i = 0; i < itemLocationTable.size(); i++) {
GetItemLocation(static_cast<RandomizerCheck>(i))->ResetVariables();
}
}
void Context::ItemReset() {
for (const RandomizerCheck il : allLocations) {
GetItemLocation(il)->ResetVariables();