Make ScriptContext available in Actor- and PlayerProperty classes
Needed to return non-native types to Lua
This commit is contained in:
@@ -25,10 +25,10 @@ namespace OpenRA.Scripting
|
||||
{
|
||||
this.player = player;
|
||||
|
||||
var args = new [] { player };
|
||||
var args = new object[] { context, player };
|
||||
var objects = context.PlayerCommands.Select(cg =>
|
||||
{
|
||||
var groupCtor = cg.GetConstructor(new Type[] { typeof(Player) });
|
||||
var groupCtor = cg.GetConstructor(new Type[] { typeof(ScriptContext), typeof(Player) });
|
||||
return groupCtor.Invoke(args);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user