beyond-all-reason / beyond-all-reason/RecoilEngine

Missing `allegiance` param documentation on a few calls

Open
#2,590 0 comments 0 reactions 0 assignees View on GitHub
area: documentation area: Lua API good first issue
Dominant language
C++
Stars
683
Forks
293
Avg merge
3d 2h
Merged PRs (30d)
40

Description

Missing or incomplete `allegiance` param on:

- https://github.com/beyond-all-reason/RecoilEngine/blob/6a85d578cad2c7b63a91527abf186aa575e61dc1/rts/Lua/LuaSyncedRead.cpp#L3124
- https://github.com/beyond-all-reason/RecoilEngine/blob/6a85d578cad2c7b63a91527abf186aa575e61dc1/rts/Lua/LuaSyncedRead.cpp#L2990

Find other places that use the allegiance helper that are missing the param or are incomplete

### Proposed fix

- right above [this](https://github.com/beyond-all-reason/RecoilEngine/blob/6a85d578cad2c7b63a91527abf186aa575e61dc1/rts/Lua/LuaSyncedRead.cpp#L99-L102), add the 4 constants that were added similar to how its done on `LuaConst` etc (I believe `Spring.ALL_UNITS` and so on)
- below it add an `@enum` or `@alias` called `UnitAllegiance`
- on `Types.lua` add `@alias teamID integer`
- add description and change type to `teamID | UnitAllegiance` on the existing `@param allegiance`
- add the missing `@param` equal to what you did above

See also:
- https://github.com/beyond-all-reason/RecoilEngine/blob/6a85d578cad2c7b63a91527abf186aa575e61dc1/rts/Lua/LuaUtils.h#L83

Contributor guide

Open the contributing guide

Research direction

Start with the referenced allegiance parameters and helper in rts/Lua/LuaSyncedRead.cpp, then compare the related constants in LuaConst and the definition in rts/Lua/LuaUtils.h. Inspect Types.lua and all other uses of the allegiance helper; done means the constants, UnitAllegiance and teamID aliases, descriptions, and missing or incomplete @param entries are documented consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, lua
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.