Added two diplomacy functions to lua

...and sneaked into AUTHORS
This commit is contained in:
abcdefg30
2014-10-05 12:24:36 +02:00
parent 8bd64f6a66
commit d7857416b1
4 changed files with 53 additions and 13 deletions

View File

@@ -111,6 +111,17 @@ namespace OpenRA
return p == null || Stances[p] == Stance.Ally;
}
public void SetStance(Player target, Stance s)
{
var oldStance = Stances[target];
Stances[target] = s;
target.Shroud.UpdatePlayerStance(World, this, oldStance, s);
Shroud.UpdatePlayerStance(World, target, oldStance, s);
foreach (var nsc in World.ActorsWithTrait<INotifyStanceChanged>())
nsc.Trait.StanceChanged(nsc.Actor, this, target, oldStance, s);
}
#region Scripting interface
Lazy<ScriptPlayerInterface> luaInterface;