Merge pull request #6699 from obrakmann/fix6692_new_objective_notification

Added notifications for new objectives to scripted missions
This commit is contained in:
Matthias Mailänder
2014-10-11 11:05:33 +02:00
9 changed files with 102 additions and 69 deletions

View File

@@ -97,6 +97,16 @@ namespace OpenRA.Mods.RA.Scripting
return mo.Objectives[id].Description;
}
[ScriptActorPropertyActivity]
[Desc("Returns the type of an objective.")]
public string GetObjectiveType(int id)
{
if (id < 0 || id >= mo.Objectives.Count)
throw new LuaException("Objective ID is out of range.");
return mo.Objectives[id].Type == ObjectiveType.Primary ? "Primary" : "Secondary";
}
[ScriptActorPropertyActivity]
[Desc("Returns true if this player has lost all units/actors that have the MustBeDestroyed trait.")]
public bool HasNoRequiredUnits()