Allow duplicate colors when map has LUA script#1888
Merged
Flamefire merged 5 commits intoReturn-To-The-Roots:masterfrom Feb 21, 2026
Merged
Allow duplicate colors when map has LUA script#1888Flamefire merged 5 commits intoReturn-To-The-Roots:masterfrom
Flamefire merged 5 commits intoReturn-To-The-Roots:masterfrom
Conversation
This can be used to `static_assert` the size of the `PLAYER_COLORS` array.
For e.g. campaigns the creator might intend duplicate colors so allow that. This also resolves the issue where color set by LUA is changed as it is still taken even though the conflicting players color might get changed right afterwards so colors would be unique when the script is done. That makes setting the colors dependent on the order which is hard. Fixes Return-To-The-Roots#1884
Member
|
@Flamefire I just had a look at the docu (probably for that one the first time): So we can add any color? And can we maybe document the colorIdxs (guess there is an array somewhere). Also what does happen if we use an invalid index (guess just nothing) |
Spikeone
reviewed
Feb 9, 2026
Spikeone
reviewed
Feb 9, 2026
Spikeone
reviewed
Feb 9, 2026
Member
Author
Yes any color. I enhanced the documentation to refer to the array and stated that custom colors are ARGB. |
459f35c to
ac36b3c
Compare
Member
Author
|
@Flow86 *ping |
Flow86
approved these changes
Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For e.g. campaigns the creator might intend duplicate colors so allow that.
This also resolves the issue where color set by LUA is changed as it is
still taken even though the conflicting players color might get changed
right afterwards so colors would be unique when the script is done.
That makes setting the colors dependent on the order which is hard.
This also makes the behavior consistent with the documentation.
Fixes #1884