Files
wwdpublic/Content.Server/Traits/Assorted/KillOnDamageComponent.cs
GNUtopia d1fa7e1711 Even More IPC Negative Traits (#2335)
# Description

Adds two new IPC-exclusive negative traits. For 3 points, Faulty
Waterproofing makes you take shock damage when splashed with or slipping
in water, similarly to slimes. For 4 points, Fragile Circuits makes you
shut down whenever you take shock damage. (yes, you can make it so that
you instantly die for slipping in a puddle)

---

<details><summary><h1>Media</h1></summary>
<p>

![Traits
menu](https://github.com/user-attachments/assets/56b5b973-95f0-41b8-9e42-f04b1153e175)
![Fragile Circuits
description](https://github.com/user-attachments/assets/4a475c82-9685-41ea-98f6-c74522fae298)
![Faulty Waterproofing
description](https://github.com/user-attachments/assets/a9d5dde0-9e6b-40bc-9b56-020f44fc3879)
![High-stakes wire punching with Fragile
Circuits](https://github.com/user-attachments/assets/6fe971cf-85f3-4e93-8046-673a5751644a)
![Faulty Waterproofing damage
example](https://github.com/user-attachments/assets/ce1b32b9-1cd4-40ba-9237-b4290b551b73)

</p>
</details>

---

# Changelog

🆑
- add: Added Faulty Waterproofing trait
- add: Added Fragile Circuits trait

---------

Signed-off-by: GNUtopia <93669372+GNUtopia@users.noreply.github.com>
(cherry picked from commit 1bb6518b24a9f939686db0d08908ec6618145235)
2025-05-16 20:06:55 +03:00

19 lines
589 B
C#

namespace Content.Server.Traits.Assorted;
/// <summary>
/// Kills an entity when it takes a certain amount of a certain damage type in a single instance.
/// Damage type required, minimum damage of that type required to kill, and message shown on death are customisable.
/// </summary>
[RegisterComponent, Access(typeof(KillOnDamageSystem))]
public sealed partial class KillOnDamageComponent : Component
{
[DataField]
public string DamageType = "Shock";
[DataField]
public float Threshold = 5.0f;
[DataField]
public LocId Popup = "fragileCircuits-kill-popup";
}