forgot to remove the member of the descriptor in case it already existed
This commit is contained in:
@@ -401,6 +401,7 @@ namespace Barotrauma
|
|||||||
var descriptor = (StandardUserDataDescriptor)UserData.RegisterType<NetLobbyScreen>();
|
var descriptor = (StandardUserDataDescriptor)UserData.RegisterType<NetLobbyScreen>();
|
||||||
var type = typeof(NetLobbyScreen);
|
var type = typeof(NetLobbyScreen);
|
||||||
var field = type.GetField("subs", BindingFlags.NonPublic | BindingFlags.Instance);
|
var field = type.GetField("subs", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||||
|
descriptor.RemoveMember("subs");
|
||||||
descriptor.AddMember("subs", new FieldMemberDescriptor(field, InteropAccessMode.Default));
|
descriptor.AddMember("subs", new FieldMemberDescriptor(field, InteropAccessMode.Default));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,6 +567,8 @@ namespace Barotrauma
|
|||||||
DoFile("Mods/LuaForBarotrauma/Lua/MoonsharpSetup.lua");
|
DoFile("Mods/LuaForBarotrauma/Lua/MoonsharpSetup.lua");
|
||||||
else // fallback to c# script loading
|
else // fallback to c# script loading
|
||||||
{
|
{
|
||||||
|
PrintMessage("Lua/MoonSharp.lua not found, loading Mods directly, things can break!");
|
||||||
|
|
||||||
List<string> modulePaths = new List<string>();
|
List<string> modulePaths = new List<string>();
|
||||||
|
|
||||||
foreach (string d in Directory.GetDirectories("Mods"))
|
foreach (string d in Directory.GetDirectories("Mods"))
|
||||||
|
|||||||
Reference in New Issue
Block a user