Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
Shields: Add hostileOnly to DamageAura
Browse files Browse the repository at this point in the history
  • Loading branch information
legodude17 committed Apr 25, 2022
1 parent e233622 commit f6270e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file modified 1.3/Assemblies/VFECore.dll
Binary file not shown.
3 changes: 2 additions & 1 deletion Source/VFECore/Misc/Shields/HediffComp_DamageAura.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override void CompPostPostRemoved()
base.CompPostPostRemoved();
}

protected virtual bool ValidateTarget(Thing thing) => thing.HostileTo(Pawn) && Props.targetingParameters.CanTarget(thing);
protected virtual bool ValidateTarget(Thing thing) => (!Props.hostileOnly || thing.HostileTo(Pawn)) && Props.targetingParameters.CanTarget(thing);
}

public class HediffCompProperties_DamageAura : HediffCompProperties_Draw
Expand All @@ -41,6 +41,7 @@ public class HediffCompProperties_DamageAura : HediffCompProperties_Draw
public float radius;
public SoundDef sustainer;
public SoundDef soundEnded;
public bool hostileOnly = true;


public TargetingParameters targetingParameters = new TargetingParameters
Expand Down

0 comments on commit f6270e8

Please sign in to comment.