Update Lua bindings to use array arguments.

This commit is contained in:
Paul Chote
2014-10-04 11:14:14 +13:00
parent 471dc409b7
commit 85b26d1ff8
7 changed files with 70 additions and 164 deletions

View File

@@ -164,14 +164,5 @@ namespace OpenRA.Scripting
throw new InvalidOperationException("Cannot convert type '{0}' to Lua. Class must implement IScriptBindable.".F(obj.GetType()));
}
public static LuaTable ToLuaTable(this IEnumerable collection, ScriptContext context)
{
var i = 1;
var table = context.CreateTable();
foreach (var x in collection)
table.Add(i++, x.ToLuaValue(context));
return table;
}
}
}