Files
wwdpublic/Content.Server/EntityEffects/Effects/StaminaChange.cs
GNUtopia a0633b5643 Stamina and Advanced Bloodloss Drugs (#2124)
# Description

Adds three new reagents. Artiplates are an advanced bloodloss chem that
reduces bleeding, heals bloodloss, and increases blood level.
Cryanobalamin and Lift Lovers Special are narcotics that restore stamina
over time. (This also comes with a new StaminaChange event to make that
work.)

---

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

![image](https://github.com/user-attachments/assets/bfe49fee-67f6-40b5-99ea-16b4c6b5c0a4)

![image](https://github.com/user-attachments/assets/3628e1e1-6fe6-4632-945d-31008c0f55b8)

![image](https://github.com/user-attachments/assets/a5ae7f9c-fb41-4495-bc6f-0c659ef76883)
![clip of lift lovers special being
used](https://github.com/user-attachments/assets/d619d1bd-7af6-433e-8505-241bda8e385e)

</p>
</details>

---

# Changelog

🆑
- add: Added advanced bloodloss chem Artiplates
- add: Added stamina-restoring chem Cryanobalamin
- add: Added stamina-restoring chem Lift Lovers Special

---------

Signed-off-by: GNUtopia <93669372+GNUtopia@users.noreply.github.com>
(cherry picked from commit c06b0ebc6ee1c0656f6b9b2c25ff277fc49e8146)
2025-04-04 14:53:08 +03:00

28 lines
1.0 KiB
C#

using Content.Shared.Damage.Systems;
using Content.Shared.EntityEffects;
using Robust.Shared.Prototypes;
namespace Content.Server.EntityEffects.Effects;
///<summary>
/// Lets a chem heal/deal stamina damage.
///</summary>
public sealed partial class StaminaChange : EntityEffect
{
[Dependency] private readonly StaminaSystem _stamina = default!;
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
=> Loc.GetString("reagent-effect-guidebook-stamina-change", ("chance", Probability), ("deltasign", MathF.Sign(Amount)), ("amount", MathF.Abs(Amount)));
///<summary>
/// Stamina damage to apply every cycle.
/// Positive is damage, negative is healing, like health changes.
///</summary>
[DataField("amount")]
public float Amount = 1.0f;
public override void Effect(EntityEffectBaseArgs args)
{
args.EntityManager.System<StaminaSystem>().TakeStaminaDamage(args.TargetEntity, Amount, visual: false);
}
}