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

Competition Team Names Prefix in Chat Messages #52

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

codyfarrey
Copy link

@codyfarrey codyfarrey commented Aug 5, 2024

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
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
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