mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-12 11:12:20 -05:00
Add saved status setting to StartingItemGive (#4600)
This commit is contained in:
parent
55960da402
commit
573d846cd7
@ -13,7 +13,10 @@ uint8_t Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey);
|
||||
GetItemEntry Randomizer_GetItemFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId);
|
||||
}
|
||||
|
||||
void StartingItemGive(GetItemEntry getItemEntry) {
|
||||
void StartingItemGive(GetItemEntry getItemEntry, RandomizerCheck randomizerCheck) {
|
||||
if (randomizerCheck != RC_MAX) {
|
||||
OTRGlobals::Instance->gRandoContext->GetItemLocation(randomizerCheck)->SetCheckStatus(RCSHOW_SAVED);
|
||||
}
|
||||
if (getItemEntry.modIndex == MOD_NONE) {
|
||||
if (getItemEntry.getItemId == GI_SWORD_BGS) {
|
||||
gSaveContext.bgsFlag = true;
|
||||
@ -96,8 +99,7 @@ void GiveLinkDekuNuts(int howManyNuts) {
|
||||
void GiveLinksPocketItem() {
|
||||
if (Randomizer_GetSettingValue(RSK_LINKS_POCKET) != RO_LINKS_POCKET_NOTHING) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LINKS_POCKET, (GetItemID)RG_NONE);
|
||||
StartingItemGive(getItemEntry);
|
||||
Rando::Context::GetInstance()->GetItemLocation(RC_LINKS_POCKET)->SetCheckStatus(RCSHOW_SAVED);
|
||||
StartingItemGive(getItemEntry, RC_LINKS_POCKET);
|
||||
// If we re-add the above, we'll get the item on save creation, now it's given on first load
|
||||
Flags_SetRandomizerInf(RAND_INF_LINKS_POCKET);
|
||||
}
|
||||
@ -381,7 +383,7 @@ extern "C" void Randomizer_InitSaveFile() {
|
||||
|
||||
if (Randomizer_GetSettingValue(RSK_SKIP_CHILD_ZELDA)) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_SONG_FROM_IMPA, (GetItemID)RG_ZELDAS_LULLABY);
|
||||
StartingItemGive(getItemEntry);
|
||||
StartingItemGive(getItemEntry, RC_SONG_FROM_IMPA);
|
||||
|
||||
// malon/talon back at ranch
|
||||
Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_POCKET_EGG);
|
||||
@ -403,7 +405,7 @@ extern "C" void Randomizer_InitSaveFile() {
|
||||
|
||||
if (Randomizer_GetSettingValue(RSK_SHUFFLE_MASTER_SWORD) && startingAge == RO_AGE_ADULT) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_TOT_MASTER_SWORD, GI_NONE);
|
||||
StartingItemGive(getItemEntry);
|
||||
StartingItemGive(getItemEntry, RC_TOT_MASTER_SWORD);
|
||||
Flags_SetRandomizerInf(RAND_INF_TOT_MASTER_SWORD);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user