workshop
This commit is contained in:
@@ -112,7 +112,9 @@ namespace Barotrauma
|
||||
UserData.RegisterType<Vector2>();
|
||||
UserData.RegisterType<Vector3>();
|
||||
UserData.RegisterType<Vector4>();
|
||||
|
||||
UserData.RegisterType<CauseOfDeathType>();
|
||||
UserData.RegisterType<Affliction>();
|
||||
|
||||
|
||||
lua = new Script(CoreModules.Preset_SoftSandbox | CoreModules.LoadMethods);
|
||||
|
||||
@@ -142,12 +144,22 @@ namespace Barotrauma
|
||||
lua.Globals["PositionType"] = UserData.CreateStatic<Level.PositionType>();
|
||||
lua.Globals["JobPrefab"] = UserData.CreateStatic<JobPrefab>();
|
||||
lua.Globals["TraitorMessageType"] = UserData.CreateStatic<TraitorMessageType>();
|
||||
lua.Globals["CauseOfDeathType"] = UserData.CreateStatic<CauseOfDeathType>();
|
||||
lua.Globals["Affliction"] = UserData.CreateStatic<Affliction>();
|
||||
|
||||
foreach (string d in Directory.GetDirectories("Lua"))
|
||||
foreach (string d in Directory.GetDirectories("Mods"))
|
||||
{
|
||||
if (Directory.Exists(d + "/autorun"))
|
||||
if (Directory.Exists(d + "/Lua/Autorun"))
|
||||
{
|
||||
luaScriptLoader.RunFolder(d + "/autorun");
|
||||
luaScriptLoader.RunFolder(d + "/Lua/Autorun");
|
||||
}
|
||||
|
||||
if (Directory.Exists(d + "/LuaRaw"))
|
||||
{
|
||||
foreach (string d2 in Directory.GetDirectories(d + "/LuaRaw"))
|
||||
{
|
||||
luaScriptLoader.RunFolder(d2 + "/Autorun");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace Barotrauma.Networking
|
||||
MultiPlayerCampaign campaign = GameMain.GameSession.GameMode as MultiPlayerCampaign;
|
||||
foreach (Client c in networkMember.ConnectedClients)
|
||||
{
|
||||
if (GameMain.Lua.game.overrideRespawnSub)
|
||||
continue;
|
||||
|
||||
if (!c.InGame) { continue; }
|
||||
if (c.SpectateOnly && (GameMain.Server.ServerSettings.AllowSpectating || GameMain.Server.OwnerConnection == c.Connection)) { continue; }
|
||||
if (c.Character != null && !c.Character.IsDead) { continue; }
|
||||
|
||||
@@ -53,6 +53,10 @@ namespace Barotrauma
|
||||
|
||||
string executableDir = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
|
||||
Directory.SetCurrentDirectory(executableDir);
|
||||
|
||||
if (File.Exists("filelist.xml"))
|
||||
Directory.SetCurrentDirectory(executableDir + "/../.."); // sweet
|
||||
|
||||
Game = new GameMain(args);
|
||||
|
||||
Game.Run();
|
||||
|
||||
Reference in New Issue
Block a user