Don't dupe shield timer team chat messages
Detect opened this issue ยท 4 comments
Don't show duplicate shield timer team chat messages when there are multiple mod users on the same team with auto-team chat enabled. For now, one of the players can temporarily disable sending their timer to team chat by pressing b
.
I'll drop this idea:
-
Don't send chat timer immediately. As you have some time before it's critical, you can use the first couple of seconds as follows:
-
Create a priority table, using a priority mechanism like the position on leaderboard (taking into account only your team members).
-
Use your place in the table in some formula like: timeOut = 500 * myIndex;
-
Create a timeout to send the first message at the indicated time set by the formula.
If nobody sent before you, send....
if somebody did, cancel and avoid sending the rest for this shield.
@Molesmalo feature request for SWAM to override and add events for Players.chat, Players.teamChat, and Players.whisper.
As the game methods converge all in UI.addChatLine (basically each does a call with different value in "type" parameter), I can offer you a simpler:
"chatLineAdded" args: [player, text, type]
Type is (as managed by the game):
0 - All
1 - Whisper To
2 - Whisper From
3 - Team
Tell me if you need separate events. But I believe this should be enough.
@Molesmalo one event sounds good ๐