Skip to content

Fix NameError with vanilla special deal prices#2534

Open
fenhl wants to merge 2 commits intoOoTRandomizer:Devfrom
fenhl:fix-vanilla-special-deal-prices
Open

Fix NameError with vanilla special deal prices#2534
fenhl wants to merge 2 commits intoOoTRandomizer:Devfrom
fenhl:fix-vanilla-special-deal-prices

Conversation

@fenhl
Copy link
Collaborator

@fenhl fenhl commented Mar 11, 2026

Fixes a generator failure introduced in #2418 that would occur when generating a seed with “Special Deal Prices” set to “Vanilla”.

Testing

This was discovered on settings string BSALAJAAX2TB2XCHGA3UL62AWGAAAAAAJAAAJNAA86A8FA8ACACCB6AAAAAAAAAAAAAAAXEEWM8AAJ2ABAHAQABAALED3AA (9.0.21). Tested to make sure these settings now generate successfully.

@fenhl fenhl added Type: Bug Something isn't working Component: Algorithm Search, Fill, Playthrough, etc Status: Needs Review Someone should be looking at it labels Mar 11, 2026
Comment on lines +711 to +713
price = location.price
if price is None:
price = ItemInfo.items[location.vanilla_item].price
Copy link
Collaborator

Choose a reason for hiding this comment

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

In what cases would there not be a price in vanilla, but there would be a price on location?

Choose a reason for hiding this comment

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

Plandomizing a price onto a shop location puts the price on location, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Business scrubs, apparently. Caught that when testing the PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So it correct that it should be done this way rather than the other way around, i.e., price = temInfo.items[location.vanilla_item].price, if price is None: price = location.price

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Algorithm Search, Fill, Playthrough, etc Status: Needs Review Someone should be looking at it Type: Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants