Class DamageThreshold
Inheritance
System.Object
DamageThreshold
Namespace: Content.Server.Destructible.Thresholds
Assembly: Content.Server.dll
Syntax
public sealed class DamageThreshold : object
Properties
| Improve this Doc View SourceBehaviors
Behaviors to activate once this threshold is triggered.
Declaration
public IReadOnlyList<IThresholdBehavior> Behaviors { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<IThresholdBehavior> |
OldTriggered
Whether or not this threshold was triggered in the previous call to Reached(DamageableComponent, DestructibleSystem).
Declaration
public bool OldTriggered { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Trigger
The trigger that decides if this threshold has been reached.
Declaration
public IThresholdTrigger Trigger { get; set; }
Property Value
Type | Description |
---|---|
IThresholdTrigger |
Triggered
Whether or not this threshold has already been triggered.
Declaration
public bool Triggered { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
TriggersOnce
Whether or not this threshold only triggers once. If false, it will trigger again once the entity is healed and then damaged to reach this threshold once again. It will not repeatedly trigger as damage rises beyond that.
Declaration
public bool TriggersOnce { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceExecute(EntityUid, DestructibleSystem, IEntityManager, Nullable<EntityUid>)
Triggers this threshold.
Declaration
public void Execute(EntityUid owner, DestructibleSystem system, IEntityManager entityManager, EntityUid? cause)
Parameters
Type | Name | Description |
---|---|---|
EntityUid | owner | The entity that owns this threshold. |
DestructibleSystem | system | An instance of DestructibleSystem to get dependency and system references from, if relevant. |
IEntityManager | entityManager | |
System.Nullable<EntityUid> | cause |
Reached(DamageableComponent, DestructibleSystem)
Declaration
public bool Reached(DamageableComponent damageable, DestructibleSystem system)
Parameters
Type | Name | Description |
---|---|---|
DamageableComponent | damageable | |
DestructibleSystem | system |
Returns
Type | Description |
---|---|
System.Boolean |