Introduce WarheadArgs
- Passes additional arguments to warheads on impact - Uses that to reduce parameter count of DoImpact by 1
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Mods.Common.Effects;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Primitives;
|
||||
@@ -103,8 +104,9 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
return invalidHit ? ImpactTargetType.InvalidActor : ImpactTargetType.NoActor;
|
||||
}
|
||||
|
||||
public override void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers)
|
||||
public override void DoImpact(Target target, WarheadArgs args)
|
||||
{
|
||||
var firedBy = args.SourceActor;
|
||||
if (!target.IsValidFor(firedBy))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user