my attempt
This commit is contained in:
@@ -308,6 +308,9 @@ namespace Barotrauma.Networking
|
||||
SendConsoleMessage("Granted all permissions to " + newClient.Name + ".", newClient);
|
||||
}
|
||||
|
||||
GameMain.Lua.hook.Call("clientConnected", new MoonSharp.Interpreter.DynValue[] { MoonSharp.Interpreter.UserData.Create(newClient) });
|
||||
|
||||
|
||||
SendChatMessage($"ServerMessage.JoinedServer~[client]={clName}", ChatMessageType.Server, null, changeType: PlayerConnectionChangeType.Joined);
|
||||
serverSettings.ServerDetailsChanged = true;
|
||||
|
||||
@@ -2346,6 +2349,9 @@ namespace Barotrauma.Networking
|
||||
|
||||
Log("Round started.", ServerLog.MessageType.ServerMessage);
|
||||
|
||||
GameMain.Lua.hook.Call("roundStart", new MoonSharp.Interpreter.DynValue[] { });
|
||||
|
||||
|
||||
gameStarted = true;
|
||||
initiatedStartGame = false;
|
||||
GameMain.ResetFrameTime();
|
||||
@@ -2461,6 +2467,9 @@ namespace Barotrauma.Networking
|
||||
Log("Ending the round...", ServerLog.MessageType.ServerMessage);
|
||||
}
|
||||
|
||||
GameMain.Lua.hook.Call("roundEnd", new MoonSharp.Interpreter.DynValue[] { });
|
||||
|
||||
|
||||
string endMessage = TextManager.FormatServerMessage("RoundSummaryRoundHasEnded");
|
||||
var traitorResults = TraitorManager?.GetEndResults() ?? new List<TraitorMissionResult>();
|
||||
|
||||
@@ -2713,6 +2722,8 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
if (client == null) return;
|
||||
|
||||
GameMain.Lua.hook.Call("clientDisconnected", new MoonSharp.Interpreter.DynValue[] { MoonSharp.Interpreter.UserData.Create(client) });
|
||||
|
||||
if (gameStarted && client.Character != null)
|
||||
{
|
||||
client.Character.ClientDisconnected = true;
|
||||
|
||||
Reference in New Issue
Block a user