string AcceptsSmudgeType replaces boolean AcceptSmudge

because Dune 2000 has different craters for rock and sand
This commit is contained in:
Matthias Mailänder
2012-06-25 21:16:31 +02:00
committed by Chris Forbes
parent b61e4a6083
commit d3915ad291
18 changed files with 135 additions and 182 deletions

View File

@@ -48,12 +48,15 @@ namespace OpenRA.Mods.RA
Sound.Play(GetImpactSound(warhead, isWater), args.dest);
if (warhead.SmudgeType != null)
var smudgeType = world.GetTerrainInfo(targetTile).AcceptsSmudgeType
.FirstOrDefault(t => warhead.SmudgeType.Contains(t));
if (smudgeType != null)
{
var smudgeLayer = world.WorldActor.TraitsImplementing<SmudgeLayer>()
.FirstOrDefault(x => x.Info.Type == warhead.SmudgeType);
.FirstOrDefault(x => x.Info.Type == smudgeType);
if (smudgeLayer == null)
throw new NotImplementedException("Unknown smudge type `{0}`".F(warhead.SmudgeType));
throw new NotImplementedException("Unknown smudge type `{0}`".F(smudgeType));
if (warhead.Size[0] > 0)
{