Skip to content

dont display empty prompt buttons#7543

Closed
NBKelly wants to merge 1 commit intomtgred:masterfrom
NBKelly:overseer-matrix-prompt-fix
Closed

dont display empty prompt buttons#7543
NBKelly wants to merge 1 commit intomtgred:masterfrom
NBKelly:overseer-matrix-prompt-fix

Conversation

@NBKelly
Copy link
Collaborator

@NBKelly NBKelly commented Jul 13, 2024

This isn't a great fix, because I still have no clue how empty options end up in the prompt state, but at the very least this is a stopgap.

Honestly, if somebody else can spy a reason for there to be some extra entries in the prompt state, they're better at inspecting code than I am 😂

It adds a test, but that test was just to determine that the issue was actually on the frontend and not the backend (still, doesn't hurt).

Closes #7424

@NoahTheDuke
Copy link
Collaborator

yeah something fucky is happening here. i suspect it's in trigger-queued-event-player:

          choices-map (map #(vector (or (:ability-name (:ability (:handler %)))
                                        (card-for-ability state (:handler %)))
                                    %) cards-with-titles)
          choices-titles (map first choices-map)

this is where a nil value will leak in. i'm not sure why, but maybe we should use keep? that'll remove any cards-with-titles that aren't allowed (idk why card-for-ability fails only here and not earlier).

@NoahTheDuke
Copy link
Collaborator

jk i figured it out, it's a real dumb issue lmao, it's tied to #7564.

@NoahTheDuke
Copy link
Collaborator

Covered by #7565

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.

Overseer Matrix' UI shows additionalt blank options

2 participants