Added OnInfiltrated function to lua

This commit is contained in:
abcdefg30
2014-10-05 12:22:27 +02:00
parent 6a24b28f92
commit b85cff62d3
2 changed files with 27 additions and 2 deletions

View File

@@ -278,6 +278,13 @@ namespace OpenRA.Mods.RA.Scripting
context.World.ActorMap.RemoveCellTrigger(id);
}
[Desc("Call a function when this actor is infiltrated. The callback function " +
"will be called as func(Actor self, Actor infiltrator).")]
public void OnInfiltrated(Actor a, LuaFunction func)
{
GetScriptTriggers(a).RegisterCallback(Trigger.OnInfiltrated, func, context);
}
[Desc("Removes all triggers from this actor.")]
public void ClearAll(Actor a)
{