Initialize Lua on tutorials and register Exception (for compatibility)

This commit is contained in:
EvilFactory
2023-04-12 12:32:25 -03:00
parent 20cb4bf320
commit aa0be735f9
2 changed files with 3 additions and 0 deletions
@@ -179,6 +179,8 @@ namespace Barotrauma.Tutorials
public void Start() public void Start()
{ {
GameMain.LuaCs.Initialize();
GameMain.Instance.ShowLoading(Loading()); GameMain.Instance.ShowLoading(Loading());
ObjectiveManager.ResetObjectives(); ObjectiveManager.ResetObjectives();
@@ -4,6 +4,7 @@ local RegisterBarotrauma = LuaSetup.LuaUserData.RegisterTypeBarotrauma
Register("System.TimeSpan") Register("System.TimeSpan")
Register("System.Exception") Register("System.Exception")
Register("System.Console") Register("System.Console")
Register("System.Exception")
RegisterBarotrauma("Success`2[[Barotrauma.ContentPackage],[System.Exception]]") RegisterBarotrauma("Success`2[[Barotrauma.ContentPackage],[System.Exception]]")
RegisterBarotrauma("Failure`2[[Barotrauma.ContentPackage],[System.Exception]]") RegisterBarotrauma("Failure`2[[Barotrauma.ContentPackage],[System.Exception]]")