Class MechanicTargetData

Namespace
TDMaker.Unity.Authoring
Assembly
TDMaker.Unity.dll

Extra recipient eligibility for mechanic actions, baked into MechanicTargetDef. Defaults accept everyone.

public sealed class MechanicTargetData
Inheritance
MechanicTargetData
Inherited Members

Constructors

MechanicTargetData()

public MechanicTargetData()

Fields

allowHeroes

Allows heroes as recipients.

public bool allowHeroes

Field Value

bool

maximumHealth

Only recipients at or below this current health; zero disables the check.

[Min(0)]
public float maximumHealth

Field Value

float

maximumHealthRatio

Only recipients at or below this share of their maximum health (1 = any).

[Range(0, 1)]
public float maximumHealthRatio

Field Value

float

rejectedTags

None of these tag bits may be present on the recipient.

public int rejectedTags

Field Value

int

requiredTags

All these tag bits must be present on the recipient (see the Tags field of enemies and soldiers).

public int requiredTags

Field Value

int

Properties

IsDefault

Whether the data accepts every recipient.

public bool IsDefault { get; }

Property Value

bool

Methods

ToDef()

Bakes the filter, or null when it accepts everyone.

public MechanicTargetDef ToDef()

Returns

MechanicTargetDef