Add chat.max_announcement_length cvar (#23571)

* Add announce message length to UI and make a cvar for it

* Update comm console server-side trim to use the cvar

* Rely on the new OnTextChanged event

Because OnKeyBindUp only works for keys that have binds

* Add a similar indicator to nukies' war declaration UI

* Remove message length indicators for now cuz it requires the engine update

* Rename cvar slightly

* Refactor duplicated code to a helper method

* Remove message trimming from *Window class as it's better to live in the BoundUserInterface where the other message handling happens

* Rename to chat.max_announcement_length
This commit is contained in:
Kot
2024-01-21 13:14:01 +04:00
committed by GitHub
parent a2d5d74b46
commit 8c5898b006
9 changed files with 61 additions and 69 deletions

View File

@@ -1598,6 +1598,9 @@ namespace Content.Shared.CCVar
public static readonly CVarDef<int> ChatMaxMessageLength =
CVarDef.Create("chat.max_message_length", 1000, CVar.SERVER | CVar.REPLICATED);
public static readonly CVarDef<int> ChatMaxAnnouncementLength =
CVarDef.Create("chat.max_announcement_length", 256, CVar.SERVER | CVar.REPLICATED);
public static readonly CVarDef<bool> ChatSanitizerEnabled =
CVarDef.Create("chat.chat_sanitizer_enabled", true, CVar.SERVERONLY);