-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "last commands" and "command count" getters #1725
Comments
Btw, why is there also the alias GetCommandQueue for GetUnitCommands? I also think many times just the cmdID is needed, so GetUnitCurrentCommandID (or maybe just GetUnitCommandID) should be added too, taking a number or negative number, to fetch that command id from the queue. Also, I feel GetUnitCurrentCommand but accepting an index is a bit of a misnomer since one would expect it's really about the current command. Maybe should be simply GetUnitCommand, not totally sure tbh, but maybe someone has a better idea. |
Legacy. Perhaps make PRs to games to replace GetCommandQueue and then we will be able to remove it.
Also legacy. Originally it had no |
One of them should be deprecated, imo there should be just one name for functions otherwise it becomes very confusing. After deprecating then it's easy to make a PR to change all obsolete uses since it's just changing the name. |
It's already just changing the name, no need to wait. |
I'll deprecate GetCommandQueue if you think that's the bad one, otherwise what's the justification for the games to pick up the change?. |
Spring.GetUnitCommands
, it will return a number with the length of the queue instead of a table with commands like it does with any other argument. Add dedicatedSpring.GetUnitCommandCount(unitID) -> number
for this (and perhaps mark the former for deprecation).Spring.GetUnitCurrentCommand(unitID, -n)
negative index support to returnn
th from last. Right now to get the last command you have to get the number of commands first and subtract manually.The text was updated successfully, but these errors were encountered: