add mechanism to exclude particular actor types from picking up any crate

This commit is contained in:
Chris Forbes
2010-10-06 18:13:29 +13:00
parent 915e123956
commit 10de282daa
2 changed files with 11 additions and 1 deletions

View File

@@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA
public void OnCrush(Actor crusher)
{
var shares = self.TraitsImplementing<CrateAction>().Select(
a => Pair.New(a, a.GetSelectionShares(crusher)));
a => Pair.New(a, a.GetSelectionSharesOuter(crusher)));
var totalShares = shares.Sum(a => a.Second);
var n = self.World.SharedRandom.Next(totalShares);