Skip to content

Competition Team Names Prefix in Chat Messages - #52

Open
codyfarrey wants to merge 17 commits into
wise-old-man:masterfrom
codyfarrey:master
Open

Competition Team Names Prefix in Chat Messages#52
codyfarrey wants to merge 17 commits into
wise-old-man:masterfrom
codyfarrey:master

Conversation

@codyfarrey

@codyfarrey codyfarrey commented Aug 5, 2024

Copy link
Copy Markdown

Added a change which:

  • pulls ongoing, team-based, competition info from WOM API to get participants list (only when the config setting is enabled)
  • creates a map of participant name and team name HashMap<String,String>()
  • determines which event types to pre-fix team name with (clan chat or clan messages)
  • prefixes WOM Competition team name to the message types which are enabled in config

Evidence below (tested with Csdy2 Test Competition)
image

Example with Display = None:
image

Example with Display = Both:
image

Example with Display = Clan Chats:
image

Example with Display = Clan Broadcasts:
image

Example with Display = Both (and Chat TImestamps turned off):
image

Example with Dispplay = Both (and Chat TImestamps turned off, with other teams chatting):
image

@codyfarrey codyfarrey closed this Aug 6, 2024
@codyfarrey codyfarrey reopened this Aug 6, 2024
Comment on lines +16 to 28
import java.util.Objects;
import java.util.Queue;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import net.runelite.api.ChatLineBuffer;
import net.runelite.api.MessageNode;
import net.runelite.api.VarbitComposition;
import net.runelite.api.WorldType;
import net.runelite.api.clan.ClanChannel;
import net.runelite.api.clan.ClanChannelMember;
import net.runelite.api.events.VarbitChanged;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are a few unused imports here that should be removed.

Comment on lines +269 to +286
@ConfigItem(
keyName = "displayCompetitionTeamNameTags",
name = "Display",
description = "Configures the display of competition team names in clan chat",
position = 1,
section = competitionTeamNamesConfig
)
default TeamNameDisplayOptions displayCompetitionTeamNameTags() { return TeamNameDisplayOptions.NONE; }

@ConfigItem(
keyName = "teamNameTagColor",
name = "Name Tag Color",
description = "Change the color of the Competition Team Name tag in the chat box",
position = 4,
section = competitionTeamNamesConfig
)
default Color teamNameTagColor() { return Color.BLACK; }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we consider putting these under the "Competitions" section instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants