mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-28 02:57:52 +03:00
# Description **Self-Aware** is a 2-point Mental trait that allows you to precisely examine your Brute/Burn damage as if using a health analyzer, and estimate the level of your toxin/airloss damage. Inspired by the SS13 trait of the same name. ## Media <details><summary>Expand</summary> **Trait entry**  **No damage**  **Damaged**  </details> # Changelog 🆑 Skubman add: Add the Self-Aware trait, a 2-point trait that allows you to examine your Brute/Burn damage numbers like a health analyzer, and estimate your toxin/airloss damage. --------- Signed-off-by: Angelo Fallaria <ba.fallaria@gmail.com> Co-authored-by: VMSolidus <evilexecutive@gmail.com>
32 lines
1.4 KiB
C#
32 lines
1.4 KiB
C#
using Content.Shared.Damage.Prototypes;
|
|
using Content.Shared.FixedPoint;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
|
|
|
|
namespace Content.Server.Traits.Assorted;
|
|
|
|
/// <summary>
|
|
/// This is used for the Self-Aware trait to enhance the information received from HealthExaminableSystem.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed partial class SelfAwareComponent : Component
|
|
{
|
|
// <summary>
|
|
// Damage types that an entity is able to precisely analyze like a health analyzer when they examine themselves.
|
|
// </summary>
|
|
[DataField(required: true, customTypeSerializer:typeof(PrototypeIdHashSetSerializer<DamageTypePrototype>))]
|
|
public HashSet<string> AnalyzableTypes = default!;
|
|
|
|
// <summary>
|
|
// Damage groups that an entity is able to detect the presence of when they examine themselves.
|
|
// </summary>
|
|
[DataField(required: true, customTypeSerializer:typeof(PrototypeIdHashSetSerializer<DamageGroupPrototype>))]
|
|
public HashSet<string> DetectableGroups = default!;
|
|
|
|
// <summary>
|
|
// The thresholds for determining the examine text of DetectableGroups for certain amounts of damage.
|
|
// These are calculated as a percentage of the entity's critical threshold.
|
|
// </summary>
|
|
public List<FixedPoint2> Thresholds = new()
|
|
{ FixedPoint2.New(0.10), FixedPoint2.New(0.25), FixedPoint2.New(0.40), FixedPoint2.New(0.60) };
|
|
}
|