colorfull chat system
# Conflicts: # Content.Server/Chat/Systems/ChatSystem.cs
This commit is contained in:
@@ -401,13 +401,15 @@ public sealed partial class ChatSystem : SharedChatSystem
|
||||
}
|
||||
|
||||
name = FormattedMessage.EscapeText(name);
|
||||
var speech = GetSpeechVerb(source, message);
|
||||
var wrappedMessage = Loc.GetString(speech.Bold ? "chat-manager-entity-say-bold-wrap-message" : "chat-manager-entity-say-wrap-message",
|
||||
("entityName", name),
|
||||
("verb", Loc.GetString(_random.Pick(speech.SpeechVerbStrings))),
|
||||
("fontType", speech.FontId),
|
||||
("fontSize", speech.FontSize),
|
||||
("message", FormattedMessage.EscapeText(message)));
|
||||
|
||||
//WD-EDIT
|
||||
var colorEv = new SetSpeakerColorEvent(source, name);
|
||||
RaiseLocalEvent(source, colorEv);
|
||||
name = colorEv.Name;
|
||||
//WD-EDIT
|
||||
|
||||
var wrappedMessage = Loc.GetString("chat-manager-entity-say-wrap-message",
|
||||
("entityName", name), ("message", FormattedMessage.EscapeText(message)));
|
||||
|
||||
SendInVoiceRange(ChatChannel.Local, message, wrappedMessage, source, range);
|
||||
|
||||
@@ -928,6 +930,20 @@ public sealed class EntitySpokeEvent : EntityEventArgs
|
||||
}
|
||||
}
|
||||
|
||||
//WD-EDIT
|
||||
public class SetSpeakerColorEvent
|
||||
{
|
||||
public EntityUid Sender { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public SetSpeakerColorEvent(EntityUid sender, string name)
|
||||
{
|
||||
Sender = sender;
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
//WD-EDIT
|
||||
|
||||
/// <summary>
|
||||
/// InGame IC chat is for chat that is specifically ingame (not lobby) but is also in character, i.e. speaking.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user