From aa0be735f98e96c67e51f5beb31d17f081175f91 Mon Sep 17 00:00:00 2001 From: EvilFactory Date: Wed, 12 Apr 2023 12:32:25 -0300 Subject: [PATCH] Initialize Lua on tutorials and register Exception (for compatibility) --- .../ClientSource/GameSession/GameModes/Tutorials/Tutorial.cs | 2 ++ .../BarotraumaShared/Lua/DefaultRegister/RegisterShared.lua | 1 + 2 files changed, 3 insertions(+) diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/Tutorial.cs b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/Tutorial.cs index d6c8f225d..5b188f944 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/Tutorial.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/Tutorial.cs @@ -179,6 +179,8 @@ namespace Barotrauma.Tutorials public void Start() { + GameMain.LuaCs.Initialize(); + GameMain.Instance.ShowLoading(Loading()); ObjectiveManager.ResetObjectives(); diff --git a/Barotrauma/BarotraumaShared/Lua/DefaultRegister/RegisterShared.lua b/Barotrauma/BarotraumaShared/Lua/DefaultRegister/RegisterShared.lua index 85f408639..38b6e6e5c 100644 --- a/Barotrauma/BarotraumaShared/Lua/DefaultRegister/RegisterShared.lua +++ b/Barotrauma/BarotraumaShared/Lua/DefaultRegister/RegisterShared.lua @@ -4,6 +4,7 @@ local RegisterBarotrauma = LuaSetup.LuaUserData.RegisterTypeBarotrauma Register("System.TimeSpan") Register("System.Exception") Register("System.Console") +Register("System.Exception") RegisterBarotrauma("Success`2[[Barotrauma.ContentPackage],[System.Exception]]") RegisterBarotrauma("Failure`2[[Barotrauma.ContentPackage],[System.Exception]]")