- Added back modifyChatMessage.

- Added missing commit file for previous commit.
This commit is contained in:
MapleWheels
2026-03-22 18:05:21 -04:00
parent ac329a70a4
commit cf3a50d6b5
2 changed files with 6 additions and 2 deletions

View File

@@ -811,7 +811,7 @@ namespace Barotrauma
var tempBuffer = new ReadWriteMessage();
WriteStatus(tempBuffer, forceAfflictionData: true);
if (msgLengthBeforeStatus + tempBuffer.LengthBytes >= 255 && restrictMessageSize && (LuaCsSetup.Instance.RestrictMessageSize))
if (msgLengthBeforeStatus + tempBuffer.LengthBytes >= 255 && restrictMessageSize)
{
msg.WriteBoolean(false);
if (msgLengthBeforeStatus < 255)

View File

@@ -3969,7 +3969,11 @@ namespace Barotrauma.Networking
//send to chat-linked wifi components
Signal s = new Signal(message, sender: senderCharacter, source: senderRadio.Item);
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
foreach (Client client in ConnectedClients)