Files
wwdpublic/Content.Server/Traits/BloodDeficiencyComponent.cs
Mnemotechnican 520a0dcc7f Blood Regeneration Affects Hunger/Thirst (#1007)
# Description
Makes natural blood regeneration use up some hunger and thirst, and halt
completely when you are starving/dying of thirst.

This is necessary to fix two issues:
1. It being possible to feed off of your own blood, by repeatedly
drawing your blood and injecting it back with a syringe. (I actually
know a few people on floof who do that on a daily basis)
2. Hunger and thirst having no real impact on gameplay, besides giving
you a mildly annoying depression overlay when low.

This PR also slightly refactors the blood deficiency trait so that it's
no longer completely hardcoded in the bloodstream system.

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

https://github.com/user-attachments/assets/f8634de5-19bd-44a5-ada2-62f4504bf3d4

</p>
</details>

# Changelog
🆑
- add: Blood regeneration now uses up hunger and thirst, and comes to a
halt when you are very hungry or thirst.
- fix: It is no longer feasible to drink your own blood to satiate your
own hunger.
# Conflicts:
#	Content.Server/Body/Systems/BloodstreamSystem.cs
2024-10-19 13:35:50 +07:00

21 lines
563 B
C#

namespace Content.Server.Traits.Assorted;
/// <summary>
/// This is used for the Blood Deficiency trait.
/// </summary>
[RegisterComponent]
public sealed partial class BloodDeficiencyComponent : Component
{
// <summary>
/// How much percentage of max blood volume should be removed in each update interval?
// </summary>
[DataField(required: true)]
public float BloodLossPercentage;
/// <summary>
/// Whether the effects of this trait should be active.
/// </summary>
[DataField]
public bool Active = true;
}