Skip to content

Only call Blind in_pool for matching blind types#1431

Merged
Aurelius7309 merged 1 commit into
Steamodded:mainfrom
mleaf233:fix/blind-pool-type-gate
Jul 10, 2026
Merged

Only call Blind in_pool for matching blind types#1431
Aurelius7309 merged 1 commit into
Steamodded:mainfrom
mleaf233:fix/blind-pool-type-gate

Conversation

@mleaf233

Copy link
Copy Markdown
Contributor

Additional Info:

  • I didn't modify api's or I've made a PR to the wiki repo.
  • I didn't modify api's or I've updated lsp definitions.
  • I didn't make new lovely files or all new lovely files have appropriate priority.

When generating a small or big blind pool, boss-only blinds were still having their in_pool callbacks executed even
though they could never enter that pool. This can trigger side effects or crashes in mods whose boss blind in_pool
logic assumes it is being checked for the boss pool.

The return value from type-mismatched in_pool calls was already ignored by if not v[blind_type], so this should not
change valid pool membership. It only avoids calling in_pool for blinds that cannot be part of the requested pool.

This changes SMODS.create_blind_pool so SMODS.add_to_pool(v) is only called after confirming the blind supports
the requested blind_type.

Before:

  local res, options = SMODS.add_to_pool(v)
  if not v[blind_type] then

After:

  if v[blind_type] then
      local res, options = SMODS.add_to_pool(v)

The existing branch order is preserved:

  • boss_already_chosen
  • options.ignore_showdown_check
  • blind_type == 'boss'
  • small/big normal checks

@Aurelius7309 Aurelius7309 merged commit c7dd9f2 into Steamodded:main Jul 10, 2026
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.

2 participants