Fixed Lua dispose method not being called if you reload manually
This commit is contained in:
@@ -346,7 +346,11 @@ namespace Barotrauma
|
|||||||
public void Initialize(bool forceEnableCs = false)
|
public void Initialize(bool forceEnableCs = false)
|
||||||
{
|
{
|
||||||
if (IsInitialized)
|
if (IsInitialized)
|
||||||
|
{
|
||||||
Stop();
|
Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
IsInitialized = true;
|
||||||
|
|
||||||
LuaCsLogger.LogMessage("Lua! Version " + AssemblyInfo.GitRevision);
|
LuaCsLogger.LogMessage("Lua! Version " + AssemblyInfo.GitRevision);
|
||||||
|
|
||||||
@@ -479,8 +483,6 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
ModUtils.Logging.PrintError($"{nameof(LuaCsSetup)}::{nameof(Initialize)}() | Error while loading assemblies! Details: {e.Message} | {e.StackTrace}");
|
ModUtils.Logging.PrintError($"{nameof(LuaCsSetup)}::{nameof(Initialize)}() | Error while loading assemblies! Details: {e.Message} | {e.StackTrace}");
|
||||||
}
|
}
|
||||||
|
|
||||||
IsInitialized = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user