Team Tags#23
Open
koiboi-dev wants to merge 29 commits into
Open
Conversation
Currently is surrounded by [TAG] name in the tab list and <TAG name> in the chat.
Added auto-refreshing for player names Modified the look of tags increased reliability when setting colors Added translations for setting the roles color
…-fix Translation fix
…viewer Permission viewer
Currently is surrounded by [TAG] name in the tab list and <TAG name> in the chat.
Added auto-refreshing for player names Modified the look of tags increased reliability when setting colors Added translations for setting the roles color
# Conflicts: # src/main/java/com/createcivilization/capitol/server/commands/team/TeamRoleCommand.java # src/main/resources/assets/capitol/lang/en_us.json
EpicVon2468
requested changes
May 12, 2026
| "team_id TEXT NOT NULL," + | ||
| "name TEXT NOT NULL," + | ||
| "permissions INTEGER NOT NULL DEFAULT 0," + | ||
| "color INTEGER NOT NULL DEFAULT -1,"+ |
Contributor
There was a problem hiding this comment.
@McArctic has made note that we shouldn't touch the database without going through him first.
I'm not sure what exactly the protocol is, but I think it's important he sees this.
Contributor
There was a problem hiding this comment.
I will take a deeper review EOW, but its basically means we need to version up DB and add migration code so players can update without nuking the database.
| public void addRole(Team team, String name, long permissions, Color color) { | ||
| try (PreparedStatement ps = getConnection().prepareStatement( | ||
| "INSERT INTO team_roles (team_id, name, permissions) VALUES (?, ?, ?)")) { | ||
| "INSERT INTO team_roles (team_id, name, permissions, color) VALUES (?, ?, ?, ?)")) { |
|
|
||
| public void updateRoleColor(Team team, String roleName, Color color) { | ||
| try (PreparedStatement ps = getConnection().prepareStatement( | ||
| "UPDATE team_roles SET color = ? WHERE team_id = ? AND name = ?")) { |
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.
Adds tags that appear next to players names in the tab list and in-game chat.
Both are configurable, letting server owners turn them on and off individually.
The tags follow the color of the nation, or if the role assigned to the player has an override color it follows that.

In this example the owner has a color of purple, whereas the regular member of the nation has orange (which is the teams color).
The owner role now defaults to purple.
The tag uses the already existing tag value given to each team and it's now capped to 3 characters by default, but it is configurable.