Add SpeakPreParseChatText hook so compatibility layers can manipulate the object that is passed to speak.ParseChatText
Add SpeakShouldShowTag hook so compatibility layers can decide whether or not it is appropriate to show a chat tag
If the element prior to a Player element is a Color then prefer that to style the player's name over team.GetColor (for TTT compatibility, which only has 1 team)
Add tag_enabled preference to specify whether to show tags at all
I18n.Set now takes a third argument allowing you to define for translations other than the active locale
Rewrite DarkRP compatibility
Add TTT compatibility
Connects #14
Testing Instructions
I downloaded DarkRP and then applied the following diff:
Overview
SpeakPreParseChatText
hook so compatibility layers can manipulate the object that is passed tospeak.ParseChatText
SpeakShouldShowTag
hook so compatibility layers can decide whether or not it is appropriate to show a chat tagPlayer
element is aColor
then prefer that to style the player's name overteam.GetColor
(for TTT compatibility, which only has 1 team)tag_enabled
preference to specify whether to show tags at allI18n.Set
now takes a third argument allowing you to define for translations other than the active localeConnects #14
Testing Instructions
I downloaded DarkRP and then applied the following diff:
Then, after running
./scripts/server
, switch to DarkRP:See that the compatibility layer works as intended:
Switch to Trouble in Terrorist Town:
See that the compatibility layer works as intended: