Skip to content

Clean-up in game.macro#8723

Merged
NoahTheDuke merged 1 commit into
mtgred:masterfrom
Cluedrew:clean-game-macro
May 4, 2026
Merged

Clean-up in game.macro#8723
NoahTheDuke merged 1 commit into
mtgred:masterfrom
Cluedrew:clean-game-macro

Conversation

@Cluedrew
Copy link
Copy Markdown
Contributor

@Cluedrew Cluedrew commented May 4, 2026

Three pieces of clean-up, in response to the recent reworks:

The new handling of binds means that it is always a vector. There was still a check if it was not and handling for that case, that has been removed.

I broke the definition of binds into two steps. Checking if we need to supply a default and spitting it it off from action are now done in the first step and the nesting of the provided bind into the deeper binding. This removed some repeated code and I believe it is clearer to read.

There was a bunch of extra code in emit-only. Did a few passes over it taking advantage of the function in mapcat, that nil is the same as an empty sequence and concatenates to nothing and that missing bindings are false to get it down to a single line. (That last one is a change of behaviour if a false value is ever in the map, but I don't see that ever happening.

@NoahTheDuke NoahTheDuke merged commit 0a80cb0 into mtgred:master May 4, 2026
3 checks passed
@Cluedrew Cluedrew deleted the clean-game-macro branch May 4, 2026 19:56
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