New special powers mechanism. Only cnc Airstrike has been reimplemented so far. Special power crates, and spy bonuses have also been disabled.

This commit is contained in:
Paul Chote
2010-12-05 11:53:42 +13:00
parent c6fad7fe98
commit 76f792bfdf
17 changed files with 366 additions and 252 deletions

View File

@@ -26,15 +26,16 @@ namespace OpenRA.Mods.RA.Crates
public override void Activate(Actor collector)
{
throw new System.NotImplementedException();
// shit and broken. if you have a single-use and a multi-use version of the same
// support power, this only works by order-coincidence. that's stupid.
var p = collector.Owner.PlayerActor.TraitsImplementing<SupportPower>()
.FirstOrDefault(sp => sp.GetType().Name == (info as SupportPowerCrateActionInfo).Power);
//var p = collector.Owner.PlayerActor.TraitsImplementing<SupportPower>()
// .FirstOrDefault(sp => sp.GetType().Name == (info as SupportPowerCrateActionInfo).Power);
if (p != null) p.Give(1);
//if (p != null) p.Give(1);
base.Activate(collector);
//base.Activate(collector);
}
}
}