mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-09-15 14:53:16 +02:00
remove cvar
This commit is contained in:
@@ -47,7 +47,7 @@ public sealed partial class ChatSystem
|
||||
speech = proto;
|
||||
}
|
||||
|
||||
name = ChatNameLinks ? $"[chatlink=\"{FormattedMessage.EscapeStringParameter(name)}\" ent=\"{GetNetEntity(source)}\"]" : FormattedMessage.EscapeText(name);
|
||||
name = $"[chatlink=\"{FormattedMessage.EscapeStringParameter(name)}\" ent=\"{GetNetEntity(source)}\"]";
|
||||
|
||||
var wrappedMessage = Loc.GetString(speech.Bold ? "chat-manager-entity-say-bold-wrap-message" : "chat-manager-entity-say-wrap-message",
|
||||
("entityName", name),
|
||||
@@ -117,7 +117,7 @@ public sealed partial class ChatSystem
|
||||
RaiseLocalEvent(source, nameEv);
|
||||
name = nameEv.VoiceName;
|
||||
}
|
||||
name = ChatNameLinks ? $"[chatlink=\"{FormattedMessage.EscapeStringParameter(name)}\" ent=\"{GetNetEntity(source)}\"]" : FormattedMessage.EscapeText(name);
|
||||
name = $"[chatlink=\"{FormattedMessage.EscapeStringParameter(name)}\" ent=\"{GetNetEntity(source)}\"]";
|
||||
|
||||
var wrappedMessage = Loc.GetString("chat-manager-entity-whisper-wrap-message",
|
||||
("entityName", name), ("message", FormattedMessage.EscapeText(message)));
|
||||
@@ -213,7 +213,7 @@ public sealed partial class ChatSystem
|
||||
private void SendLOOC(EntityUid source, ICommonSession player, string message, bool hideChat)
|
||||
{
|
||||
var name = FormattedMessage.EscapeText(Identity.Name(source, EntityManager));
|
||||
name = ChatNameLinks ? $"[chatlink=\"{FormattedMessage.EscapeStringParameter(name)}\" ent=\"{GetNetEntity(source)}\"]" : FormattedMessage.EscapeText(name);
|
||||
name = $"[chatlink=\"{FormattedMessage.EscapeStringParameter(name)}\" ent=\"{GetNetEntity(source)}\"]";
|
||||
|
||||
if (_adminManager.IsAdmin(player))
|
||||
{
|
||||
@@ -251,7 +251,7 @@ public sealed partial class ChatSystem
|
||||
}
|
||||
else
|
||||
{
|
||||
playerName = ChatNameLinks ? $"[chatlink=\"{FormattedMessage.EscapeStringParameter(playerName)}\" ent=\"{GetNetEntity(source)}\"]" : FormattedMessage.EscapeText(playerName);
|
||||
playerName = $"[chatlink=\"{FormattedMessage.EscapeStringParameter(playerName)}\" ent=\"{GetNetEntity(source)}\"]";
|
||||
wrappedMessage = Loc.GetString("chat-manager-send-dead-chat-wrap-message",
|
||||
("deadChannelName", Loc.GetString("chat-manager-dead-channel-name")),
|
||||
("playerName", (playerName)),
|
||||
|
||||
@@ -62,7 +62,7 @@ public sealed partial class RadioSystem : SharedRadioSystem
|
||||
RaiseLocalEvent(messageSource, evt);
|
||||
|
||||
var name = evt.VoiceName;
|
||||
name = _chat.ChatNameLinks ? $"[chatlink=\"{FormattedMessage.EscapeStringParameter(name)}\" ent=\"{GetNetEntity(messageSource)}\"]" : FormattedMessage.EscapeText(name);
|
||||
name = $"[chatlink=\"{FormattedMessage.EscapeStringParameter(name)}\" ent=\"{GetNetEntity(messageSource)}\"]";
|
||||
|
||||
SpeechVerbPrototype speech;
|
||||
if (evt.SpeechVerb != null && ProtoMan.Resolve(evt.SpeechVerb, out var evntProto))
|
||||
|
||||
@@ -83,11 +83,4 @@ public sealed partial class CCVars
|
||||
/// </summary>
|
||||
public static readonly CVarDef<string> ChatHighlightsColor =
|
||||
CVarDef.Create("chat.highlights_color", "#17FFC1FF", CVar.CLIENTONLY | CVar.ARCHIVE, "The color in which the highlights will be displayed.");
|
||||
|
||||
/// <summary>
|
||||
/// If true will allow Chat Name Links to make interactable chat fields.
|
||||
/// </summary>
|
||||
|
||||
public static readonly CVarDef<bool> ChatNameLinks =
|
||||
CVarDef.Create("chat.chat_name_links", true, CVar.REPLICATED | CVar.SERVER, "Toggles Chat Name Link functionality.");
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ public abstract partial class SharedChatSystem : EntitySystem
|
||||
= new SoundPathSpecifier("/Audio/Announcements/announce.ogg");
|
||||
|
||||
public static readonly ProtoId<RadioChannelPrototype> CommonChannel = "Common";
|
||||
public bool ChatNameLinks { get; private set; }
|
||||
|
||||
public static readonly string DefaultChannelPrefix = $"{RadioChannelPrefix}{DefaultChannelKey}";
|
||||
public static readonly ProtoId<SpeechVerbPrototype> DefaultSpeechVerb = "Default";
|
||||
@@ -72,8 +71,6 @@ public abstract partial class SharedChatSystem : EntitySystem
|
||||
SubscribeAllEvent<ClickMessageSenderRequestEvent>(OnClickMessageSenderRequest);
|
||||
CacheRadios();
|
||||
CacheEmotes();
|
||||
|
||||
Subs.CVar(_config, CCVars.ChatNameLinks, v => ChatNameLinks = v, true);
|
||||
}
|
||||
|
||||
protected virtual void OnPrototypeReload(PrototypesReloadedEventArgs obj)
|
||||
@@ -87,8 +84,6 @@ public abstract partial class SharedChatSystem : EntitySystem
|
||||
|
||||
private void OnClickMessageSenderRequest(ClickMessageSenderRequestEvent msg, EntitySessionEventArgs args)
|
||||
{
|
||||
if (!ChatNameLinks)
|
||||
return;
|
||||
|
||||
if (args.SenderSession.AttachedEntity is not { Valid: true } ent ||
|
||||
!CanClickMessageSender(ent))
|
||||
@@ -344,8 +339,6 @@ public abstract partial class SharedChatSystem : EntitySystem
|
||||
|
||||
public bool CanClickMessageSender(EntityUid? ent)
|
||||
{
|
||||
if (!ChatNameLinks)
|
||||
return false;
|
||||
|
||||
ent ??= _player.LocalEntity;
|
||||
if (ent == null)
|
||||
|
||||
Reference in New Issue
Block a user