Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix red potion bottle #202

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

balloondude2
Copy link
Collaborator

@balloondude2 balloondude2 commented Jan 26, 2025

Red Potion bottle was always going on the first bottle slot. This corrects it to go on the first open bottle slot.

Also adds the convert stuff for the Red Potion Bottle.

I tried changing the itemId for RI_BOTTLE_RED_POTION to ITEM_LONGSHOT instead, but that made the notification icon a Longshot. So I opted for the entry in GiveItem.cpp

Build Artifacts

@Eblo
Copy link
Collaborator

Eblo commented Jan 26, 2025

I first confirmed the issue without this fix; ITEM_RED_POTION indeed overwrites the first bottle slot even if something is there. I then tested the fix, which correctly adds a new bottle even if other bottles are already obtained. ITEM_LONGSHOT checks out here:

} else if (item == ITEM_LONGSHOT) {
slot = SLOT(item);
for (i = BOTTLE_FIRST; i < BOTTLE_MAX; i++) {
if (gSaveContext.save.saveInfo.inventory.items[slot + i] == ITEM_NONE) {
gSaveContext.save.saveInfo.inventory.items[slot + i] = ITEM_POTION_RED;
return ITEM_NONE;
}
}
return item;

The icon in the textbox and popup correctly displays the red potion bottle as well. Everything looks good here.

@Eblo Eblo mentioned this pull request Jan 27, 2025
52 tasks
@garrettjoecox garrettjoecox merged commit c9dea02 into garrettjoecox:develop-rando Jan 27, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants