Skip to content

Fix logic placing item on saving carpenters when carpenters start free#6661

Merged
serprex merged 2 commits into
HarbourMasters:developfrom
serprex:fix-freed-carpenter-logic
May 31, 2026
Merged

Fix logic placing item on saving carpenters when carpenters start free#6661
serprex merged 2 commits into
HarbourMasters:developfrom
serprex:fix-freed-carpenter-logic

Conversation

@serprex
Copy link
Copy Markdown
Member

@serprex serprex commented May 31, 2026

Set flag on savefile, fill location when freed, don't junk check when card shuffled

fixes #6652

Build Artifacts

Set flag on savefile, fill location when freed, don't junk check when card shuffled
@serprex serprex requested a review from Pepper0ni May 31, 2026 05:05
if (gals.resetSphere) {
gals.resetSphere = false;
i = -1;
i = 0;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fixing unrelated issue where size_t is unsigned so this would effectively break from loop, rendering this optimization inept

Comment on lines 1012 to +1015
std::erase_if(itemPool, [](const auto i) {
return Rando::StaticData::RetrieveItem(i).GetItemType() == ITEMTYPE_DUNGEONREWARD;
});
AssumedFill(rewards, Rando::StaticData::dungeonRewardLocations);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pepper0ni pulling this fix from #5659 where this ran into same problem where closed door of time failed to generate seeds. AssumedFill would think itemPool has stones & end up placing stones on Morpha or whatever, causing generation to fail consistently

// Gerudo Membership Card
if (ctx->GetOption(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD)) {
AddItemToPool(RG_GERUDO_MEMBERSHIP_CARD, 2, 1, 1, 1);
if (ctx->GetOption(RSK_GERUDO_FORTRESS).IsNot(RO_GF_CARPENTERS_FREE)) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like an existing bug that'd always junk freeing carpenters when card shuffled. These checks shouldn't be coupled, so moved junking freeing carpenters to when carpenters start freed

@serprex serprex force-pushed the fix-freed-carpenter-logic branch from 582ec60 to 09516be Compare May 31, 2026 05:19
@serprex serprex merged commit 80d3114 into HarbourMasters:develop May 31, 2026
7 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.

[Rando] - "Free" option for Fortress Carpenters makes "GF Freed All Carpenters" item check unobtainable

2 participants