Make Conquest- and StrategicVictoryConditions use objectives backend

Note: 3rd party KotH maps will need to be modified to work correctly
with this change.  Previously, StrategicVictoryConditions was a
supplement to ConquestVictoryConditions.  After this change, each works
by itself.  So KotH maps will need to remove the ConquestVictoryConditions
trait from the player definitions, or both victory conditions will have
to be satisfied to win the game.
This commit is contained in:
Oliver Brakmann
2014-07-25 09:25:32 +02:00
parent a3bf3e7403
commit 6e3000ab0e
7 changed files with 125 additions and 60 deletions

View File

@@ -319,7 +319,7 @@ namespace OpenRA.Mods.RA.Scripting
[LuaGlobal]
public bool RequiredUnitsAreDestroyed(Player player)
{
return world.ActorsWithTrait<MustBeDestroyed>().All(p => p.Actor.Owner != player);
return player.HasNoRequiredUnits();
}
[LuaGlobal]