This commit is contained in:
Evil Factory
2021-02-12 19:26:18 -03:00
parent 05ea1d2a3a
commit ed2091a4ab
7 changed files with 116 additions and 19 deletions
@@ -127,6 +127,21 @@ namespace Barotrauma.Networking
return;
}
var should = GameMain.Lua.hook.Call("chatMessage", new DynValue[] { DynValue.NewString(txt), UserData.Create(c) });
if(should != null)
{
if (should.CastToBool())
{
return;
}
else
{
}
}
if (type == ChatMessageType.Order)
{
if (c.Character == null || c.Character.SpeechImpediment >= 100.0f || c.Character.IsDead) { return; }
@@ -178,9 +193,6 @@ namespace Barotrauma.Networking
}
GameMain.Lua.hook.Call("chatMessage", new DynValue[] { DynValue.NewString(txt), UserData.Create(c) });
}
public int EstimateLengthBytesServer(Client c)