Skip to content
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 "team-color" attribute to Armor Kits #856

Merged
merged 6 commits into from
May 19, 2021
Merged

Add "team-color" attribute to Armor Kits #856

merged 6 commits into from
May 19, 2021

Conversation

destial
Copy link
Contributor

@destial destial commented Apr 23, 2021

When ever I create maps, most of the time I have to create a separate kit for the teams while trying to find the correct color that corresponds to their color.

Like so:

<helmet color="cd00cd" unbreakable="true" material="leather helmet"/>

So, I added an attribute that automatically uses the team's color so that I can just use the default kit and it will automatically use the team's color when applied.

Like so:

<helmet team-color="true" unbreakable="true" material="leather helmet"/>

I made it so "team-color" overrides the "color" attribute since it is applied during the match and not beforehand.

@destial destial requested a review from Electroid as a code owner April 23, 2021 01:09
@CoWinkKeyDinkInc
Copy link
Contributor

I don't really see what is the issue here that this resolves, a colour picker is easy to find and search online while referring to the documentation in another tab while writing XML. Since they are hex colours, what would be the default values you would use for the team colours?

@Pablete1234
Copy link
Member

I don't really see what is the issue here that this resolves, a colour picker is easy to find and search online while referring to the documentation in another tab while writing XML. Since they are hex colours, what would be the default values you would use for the team colours?

It's simply convenience, also removes the need of having 3 kits, one main one and one per each team that have the other as parent, it simplifies XML

@Pugzy
Copy link
Contributor

Pugzy commented Apr 23, 2021

Did the Stratus (or was it Walrus) implementation work with blocks too (glass, clay, wool etc)?

I recall some funky repair integration too. Anyone got a link to their docs?

@Electroid
Copy link
Member

Since this is syntax sugar, it'd be nice to make it even simpler: color=<hex|true|false>

@destial
Copy link
Contributor Author

destial commented Apr 24, 2021

color is parsed under parseItemMeta and set's the item meta once passed. it doesnt take the armorkit as a parameter, so it would be more complicated.

Signed-off-by: destial <destialpvp@gmail.com>
Signed-off-by: destial <destialpvp@gmail.com>
Signed-off-by: destial <destialpvp@gmail.com>
Signed-off-by: destial <destialpvp@gmail.com>
Signed-off-by: destial <destialpvp@gmail.com>
Signed-off-by: destial <destialpvp@gmail.com>
Copy link
Member

@Electroid Electroid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, I think the syntax you've proposed is good.

@Electroid Electroid merged commit 405f5f7 into PGMDev:dev May 19, 2021
@Electroid
Copy link
Member

Congrats on your first PGM feature! (and one of the most requested ones by map makers!)

@destial destial deleted the destiall branch June 1, 2021 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants