Add DamageTypes to Demolition

This commit is contained in:
Mustafa Alperen Seki
2020-10-13 19:00:05 +03:00
committed by abcdefg30
parent 54c4a05062
commit 8aeec24c9b
11 changed files with 35 additions and 21 deletions

View File

@@ -13,6 +13,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Orders;
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
@@ -36,6 +37,9 @@ namespace OpenRA.Mods.Common.Traits
"Possible values are Exit, Suicide, Dispose.")]
public readonly EnterBehaviour EnterBehaviour = EnterBehaviour.Exit;
[Desc("Types of damage that this trait causes. Leave empty for no damage types.")]
public readonly BitSet<DamageType> DamageTypes = default(BitSet<DamageType>);
[VoiceReference]
[Desc("Voice string when planting explosive charges.")]
public readonly string Voice = "Action";
@@ -84,7 +88,7 @@ namespace OpenRA.Mods.Common.Traits
}
self.QueueActivity(order.Queued, new Demolish(self, order.Target, info.EnterBehaviour, info.DetonationDelay,
info.Flashes, info.FlashesDelay, info.FlashInterval));
info.Flashes, info.FlashesDelay, info.FlashInterval, info.DamageTypes));
self.ShowTargetLines();
}