beyond-all-reason / beyond-all-reason/RecoilEngine
Implement `weaponDef:pairs()` and `featureDef:pairs()`
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 38
Description
These should work the same way `unitDef:pairs()` currently does, i.e. would iterate over the def tags of that particular def.
Perhaps the better thing to do would be to make regular `pairs` work on them but I don't know how feasible this is. Note that defs are proxy tables with the `__index` meta-method which is why regular `pairs` doesn't work for them.
Contributor guide
Research direction
Start by locating the existing unitDef:pairs() implementation and the proxy definitions for weaponDef and featureDef. Compare how their def tags are exposed, then implement matching iteration behavior or assess whether regular pairs can support them, and verify that both APIs iterate the expected tags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100