move LuaPlayer and CreateVector to a separate compatibility lua file
This commit is contained in:
@@ -22,21 +22,6 @@ namespace Barotrauma
|
||||
|
||||
partial class LuaSetup
|
||||
{
|
||||
private static Vector2 CreateVector2(float x, float y)
|
||||
{
|
||||
return new Vector2(x, y);
|
||||
}
|
||||
|
||||
private static Vector3 CreateVector3(float x, float y, float z)
|
||||
{
|
||||
return new Vector3(x, y, z);
|
||||
}
|
||||
|
||||
private static Vector4 CreateVector4(float x, float y, float z, float w)
|
||||
{
|
||||
return new Vector4(x, y, z, w);
|
||||
}
|
||||
|
||||
partial class LuaUserData
|
||||
{
|
||||
public static Type GetType(string typeName)
|
||||
@@ -112,11 +97,6 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public partial class LuaPlayer
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public partial class LuaGame
|
||||
{
|
||||
LuaSetup env;
|
||||
|
||||
@@ -317,7 +317,6 @@ namespace Barotrauma
|
||||
game = new LuaGame(this);
|
||||
networking = new LuaNetworking(this);
|
||||
|
||||
UserData.RegisterType<LuaPlayer>();
|
||||
UserData.RegisterType<LuaHook>();
|
||||
UserData.RegisterType<LuaGame>();
|
||||
UserData.RegisterType<LuaRandom>();
|
||||
@@ -350,7 +349,6 @@ namespace Barotrauma
|
||||
lua.Globals["load"] = (Func<string, Table, string, DynValue>)LoadString;
|
||||
|
||||
lua.Globals["LuaUserData"] = UserData.CreateStatic<LuaUserData>();
|
||||
lua.Globals["Player"] = new LuaPlayer();
|
||||
lua.Globals["Game"] = game;
|
||||
lua.Globals["Hook"] = hook;
|
||||
lua.Globals["Random"] = new LuaRandom();
|
||||
@@ -358,11 +356,6 @@ namespace Barotrauma
|
||||
lua.Globals["File"] = UserData.CreateStatic<LuaFile>();
|
||||
lua.Globals["Networking"] = networking;
|
||||
|
||||
// obsolete
|
||||
lua.Globals["CreateVector2"] = (Func<float, float, Vector2>)CreateVector2;
|
||||
lua.Globals["CreateVector3"] = (Func<float, float, float, Vector3>)CreateVector3;
|
||||
lua.Globals["CreateVector4"] = (Func<float, float, float, float, Vector4>)CreateVector4;
|
||||
|
||||
#if SERVER
|
||||
|
||||
#elif CLIENT
|
||||
|
||||
Reference in New Issue
Block a user