separated Lua source by client, server and shared

github desktop bugged
This commit is contained in:
Evil Factory
2021-09-15 12:59:19 -03:00
parent 5678f81326
commit 4075e71f7a
12 changed files with 750 additions and 612 deletions
@@ -3096,6 +3096,22 @@ namespace Barotrauma
NewMessage("Level seed: " + Level.Loaded.Seed);
}
});
commands.Add(new Command("lua_cl", "lua_cl: runs a string on the client", (string[] args) =>
{
if (GameMain.Client != null)
GameMain.Lua.DoString(string.Join(" ", args));
else
ThrowError("Client not connected to any server.");
}));
commands.Add(new Command("reloadlua_cl", "reloads lua on the client", (string[] args) =>
{
if (GameMain.Client != null)
GameMain.Lua.Initialize();
else
ThrowError("Client not connected to any server.");
}));
}
private static void ReloadWearables(Character character, int variant = 0)