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:
@@ -1031,8 +1031,6 @@ namespace Barotrauma
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
GameMain.LuaCs.Initialize();
|
|
||||||
|
|
||||||
CloseItem();
|
CloseItem();
|
||||||
|
|
||||||
backedUpSubInfo = new SubmarineInfo(MainSub);
|
backedUpSubInfo = new SubmarineInfo(MainSub);
|
||||||
@@ -1324,12 +1322,12 @@ namespace Barotrauma
|
|||||||
public override void Select()
|
public override void Select()
|
||||||
{
|
{
|
||||||
Select(enableAutoSave: true);
|
Select(enableAutoSave: true);
|
||||||
|
|
||||||
|
GameMain.LuaCs.Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Select(bool enableAutoSave = true)
|
public void Select(bool enableAutoSave = true)
|
||||||
{
|
{
|
||||||
GameMain.LuaCs.Stop();
|
|
||||||
|
|
||||||
base.Select();
|
base.Select();
|
||||||
|
|
||||||
TaskPool.Add(
|
TaskPool.Add(
|
||||||
|
|||||||
@@ -9,6 +9,13 @@ for key, value in pairs(localizedStrings) do
|
|||||||
RegisterBarotrauma(value)
|
RegisterBarotrauma(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
RegisterBarotrauma("EditorScreen")
|
||||||
|
RegisterBarotrauma("SubEditorScreen")
|
||||||
|
RegisterBarotrauma("EventEditorScreen")
|
||||||
|
RegisterBarotrauma("CharacterEditorScreen")
|
||||||
|
RegisterBarotrauma("SpriteEditorScreen")
|
||||||
|
RegisterBarotrauma("LevelEditorScreen")
|
||||||
|
|
||||||
RegisterBarotrauma("Networking.ClientPeer")
|
RegisterBarotrauma("Networking.ClientPeer")
|
||||||
RegisterBarotrauma("Networking.GameClient")
|
RegisterBarotrauma("Networking.GameClient")
|
||||||
RegisterBarotrauma("Networking.VoipCapture")
|
RegisterBarotrauma("Networking.VoipCapture")
|
||||||
|
|||||||
@@ -16,10 +16,11 @@ namespace Barotrauma
|
|||||||
public bool IsMultiplayer => GameMain.IsMultiplayer;
|
public bool IsMultiplayer => GameMain.IsMultiplayer;
|
||||||
|
|
||||||
#if CLIENT
|
#if CLIENT
|
||||||
|
public bool? ForceVoice = null;
|
||||||
|
public bool? ForceLocalVoice = null;
|
||||||
|
|
||||||
public bool Paused => GameMain.Instance?.Paused == true;
|
public bool Paused => GameMain.Instance?.Paused == true;
|
||||||
|
|
||||||
public byte MyID => GameMain.Client.ID;
|
public byte MyID => GameMain.Client.ID;
|
||||||
|
|
||||||
public ChatMode ActiveChatMode => GameMain.ActiveChatMode;
|
public ChatMode ActiveChatMode => GameMain.ActiveChatMode;
|
||||||
|
|
||||||
public ChatBox ChatBox
|
public ChatBox ChatBox
|
||||||
@@ -49,8 +50,21 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool? ForceVoice = null;
|
public SubEditorScreen SubEditorScreen
|
||||||
public bool? ForceLocalVoice = null;
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return GameMain.SubEditorScreen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsSubEditor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Screen.Selected is SubEditorScreen;
|
||||||
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
public bool IsDedicated
|
public bool IsDedicated
|
||||||
@@ -179,13 +193,13 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if SERVER
|
#if SERVER
|
||||||
public ServerPeer Peer
|
public ServerPeer Peer
|
||||||
|
{
|
||||||
|
get
|
||||||
{
|
{
|
||||||
get
|
return GameMain.Server.ServerPeer;
|
||||||
{
|
|
||||||
return GameMain.Server.ServerPeer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
public ClientPeer Peer
|
public ClientPeer Peer
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user