Skip to content

Use enums for parameter indexing#86

Merged
xconverge merged 3 commits intobkshepherd:mainfrom
chattob:parameter-enums
Mar 8, 2026
Merged

Use enums for parameter indexing#86
xconverge merged 3 commits intobkshepherd:mainfrom
chattob:parameter-enums

Conversation

@chattob
Copy link
Copy Markdown
Contributor

@chattob chattob commented Mar 7, 2026

This is a PR that touches a lot of files, but the diff is mechanical (not functional) and the change pattern is mostly the same across modules. It should make the code easier to follow and reduce the chance of parameter indexing mistakes when coding.

What do you think?

Full disclosure: this was AI assisted but carefully reviewed by myself.

Summary

This PR cleans up parameter handling across the effect modules by replacing positional parameter indexes with named enum values. The main goal is to make the effect modules easier to read and safer to maintain.

What changed

  • Added named parameter enums to each effect module
  • Replaced magic-number parameter access with enum-based IDs
  • Modified metadata definitions using std::array and local lambda initialization

@xconverge
Copy link
Copy Markdown
Collaborator

xconverge commented Mar 7, 2026

Did the agent find any that were wrong that this fixes? I think it's a good change and I like it

@spamatica
Copy link
Copy Markdown
Contributor

Just chiming in that I'm all for this!
I think I actually have a branch where I did the same for just some of the effects... but as I just don't seem to get to the finish line these days I'm happy that others do! :)

@chattob
Copy link
Copy Markdown
Contributor Author

chattob commented Mar 8, 2026

Did the agent find any that were wrong that this fixes? I think it's a good change and I like it

No, there was nothing to fix. It's really just about readability.

@xconverge xconverge merged commit 2f47ce6 into bkshepherd:main Mar 8, 2026
1 check passed
@chattob chattob deleted the parameter-enums branch March 8, 2026 11:32
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.

3 participants