Fixes some miscellaneous issues for Switch builds.

This commit is contained in:
Christopher Leggett 2023-12-12 18:51:26 -05:00
commit 674645ef14
No known key found for this signature in database
GPG key ID: 22E7784811D1BD98
5 changed files with 27 additions and 8 deletions

View file

@ -127,6 +127,20 @@ ItemLocation* Context::GetItemLocation(size_t locKey) {
return &itemLocationTable[static_cast<RandomizerCheck>(locKey)];
}
ItemOverride& Context::GetItemOverride(RandomizerCheck locKey) {
if (!overrides.contains(locKey)) {
overrides.emplace(locKey, ItemOverride());
}
return overrides.at(locKey);
}
ItemOverride& Context::GetItemOverride(size_t locKey) {
if (!overrides.contains(static_cast<RandomizerCheck>(locKey))) {
overrides.emplace(static_cast<RandomizerCheck>(locKey), ItemOverride());
}
return overrides.at(static_cast<RandomizerCheck>(locKey));
}
void Context::PlaceItemInLocation(const RandomizerCheck locKey, const RandomizerGet item, const bool applyEffectImmediately,
const bool setHidden) {
const auto loc = GetItemLocation(locKey);