Skip to content

Build player-action mapping dynamically#47

Merged
manuq merged 1 commit intomainfrom
push-qxlozmmqtmyv
Nov 20, 2025
Merged

Build player-action mapping dynamically#47
manuq merged 1 commit intomainfrom
push-qxlozmmqtmyv

Conversation

@wjt
Copy link
Copy Markdown
Member

@wjt wjt commented Nov 20, 2025

Previously there was a constant dictionary mapping player enum × short action name to full action name. This is very simple but is tedious to keep updated as more actions are added.

Instead, build the mapping dynamically from a constant array of short action names, and improve the actions.gd documentation.

As it stands this is a bit longer than writing it out by hand, but future commits which will add new actions become one-liners.

Previously there was a constant dictionary mapping player enum × short
action name to full action name. This is very simple but is tedious to
keep updated as more actions are added.

Instead, build the mapping dynamically from a constant array of short
action names, and improve the actions.gd documentation.

As it stands this is a bit longer than writing it out by hand, but
future commits which will add new actions become one-liners.
@wjt wjt requested a review from a team as a code owner November 20, 2025 11:09
@github-actions
Copy link
Copy Markdown

Play this branch at https://endlessm.github.io/moddable-platformer/branches/endlessm/push-qxlozmmqtmyv.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@manuq manuq merged commit c4ac46e into main Nov 20, 2025
6 checks passed
@manuq manuq deleted the push-qxlozmmqtmyv branch November 20, 2025 13:21
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