LuaCs is now initialized after sub editor screen is first selected, added Game.IsSubEditor, Game.SubEditorScreen and registered editor screens

This commit is contained in:
EvilFactory
2022-07-27 20:01:20 -03:00
parent 1b020ff99e
commit 069567c681
3 changed files with 32 additions and 13 deletions
@@ -1031,8 +1031,6 @@ namespace Barotrauma
return true;
}
GameMain.LuaCs.Initialize();
CloseItem();
backedUpSubInfo = new SubmarineInfo(MainSub);
@@ -1324,12 +1322,12 @@ namespace Barotrauma
public override void Select()
{
Select(enableAutoSave: true);
GameMain.LuaCs.Initialize();
}
public void Select(bool enableAutoSave = true)
{
GameMain.LuaCs.Stop();
base.Select();
TaskPool.Add(