Add DamageTypes to Kill() and make some traits use it.
This commit is contained in:
committed by
reaperrr
parent
b620e8107f
commit
5e7e3bb011
@@ -46,6 +46,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public WeaponInfo DemolishWeaponInfo { get; private set; }
|
||||
|
||||
[Desc("Types of damage that this bridge causes to units over/in path of it while being destroyed/repaired. Leave empty for no damage types.")]
|
||||
public readonly HashSet<string> DamageTypes = new HashSet<string>();
|
||||
|
||||
public object Create(ActorInitializer init) { return new Bridge(init.Self, this); }
|
||||
|
||||
public void RulesetLoaded(Ruleset rules, ActorInfo ai)
|
||||
@@ -241,7 +244,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
foreach (var c in footprint.Keys)
|
||||
foreach (var a in self.World.ActorMap.GetActorsAt(c))
|
||||
if (a.Info.HasTraitInfo<IPositionableInfo>() && !a.Trait<IPositionable>().CanEnterCell(c))
|
||||
a.Kill(self);
|
||||
a.Kill(self, info.DamageTypes);
|
||||
}
|
||||
|
||||
bool NeighbourIsDeadShore(Bridge neighbour)
|
||||
|
||||
Reference in New Issue
Block a user