- Added back modifyChatMessage.
- Added missing commit file for previous commit.
This commit is contained in:
@@ -811,7 +811,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
var tempBuffer = new ReadWriteMessage();
|
var tempBuffer = new ReadWriteMessage();
|
||||||
WriteStatus(tempBuffer, forceAfflictionData: true);
|
WriteStatus(tempBuffer, forceAfflictionData: true);
|
||||||
if (msgLengthBeforeStatus + tempBuffer.LengthBytes >= 255 && restrictMessageSize && (LuaCsSetup.Instance.RestrictMessageSize))
|
if (msgLengthBeforeStatus + tempBuffer.LengthBytes >= 255 && restrictMessageSize)
|
||||||
{
|
{
|
||||||
msg.WriteBoolean(false);
|
msg.WriteBoolean(false);
|
||||||
if (msgLengthBeforeStatus < 255)
|
if (msgLengthBeforeStatus < 255)
|
||||||
|
|||||||
@@ -3971,6 +3971,10 @@ namespace Barotrauma.Networking
|
|||||||
senderRadio.TransmitSignal(s, sentFromChat: true);
|
senderRadio.TransmitSignal(s, sentFromChat: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var hookChatMsg = ChatMessage.Create(senderName, message, (ChatMessageType)type, senderCharacter, senderClient, changeType);
|
||||||
|
|
||||||
|
var should = LuaCsSetup.Instance.Hook.Call<bool?>("modifyChatMessage", hookChatMsg, senderRadio);
|
||||||
|
|
||||||
//check which clients can receive the message and apply distance effects
|
//check which clients can receive the message and apply distance effects
|
||||||
foreach (Client client in ConnectedClients)
|
foreach (Client client in ConnectedClients)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user