Lua is automatically initialized when entering singleplayer campaigns (doesn't include submarine editor) and roundStart && roundEnd hooks now work in CL Lua
This commit is contained in:
@@ -91,4 +91,8 @@ end
|
||||
|
||||
setmodulepaths(modulePaths)
|
||||
|
||||
Hook.Add("stop", "luaSetup.stop", function ()
|
||||
print("Stopping Lua...")
|
||||
end)
|
||||
|
||||
Hook.Call("loaded")
|
||||
@@ -460,6 +460,8 @@ namespace Barotrauma
|
||||
GUI.PreventPauseMenuToggle = false;
|
||||
|
||||
HintManager.OnRoundStarted();
|
||||
|
||||
GameMain.Lua.hook.Call("roundStart");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -686,6 +688,10 @@ namespace Barotrauma
|
||||
{
|
||||
RoundEnding = true;
|
||||
|
||||
#if CLIENT
|
||||
GameMain.Lua.hook.Call("roundEnd");
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
IEnumerable<Character> crewCharacters = GetSessionCrewCharacters();
|
||||
|
||||
Reference in New Issue
Block a user