forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Health Consideration for NPCs (space-wizards#29922)
Implement TargetHealthCon
- Loading branch information
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
Content.Server/NPC/Queries/Considerations/TargetHealthCon.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
using Content.Shared.Mobs; | ||
|
||
namespace Content.Server.NPC.Queries.Considerations; | ||
|
||
/// <summary> | ||
/// Goes linearly from 1f to 0f, with 0 damage returning 1f and <see cref=TargetState> damage returning 0f | ||
/// </summary> | ||
public sealed partial class TargetHealthCon : UtilityConsideration | ||
{ | ||
|
||
/// <summary> | ||
/// Which MobState the consideration returns 0f at, defaults to choosing earliest incapacitating MobState | ||
/// </summary> | ||
[DataField("targetState")] | ||
public MobState TargetState = MobState.Invalid; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters