mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 14:07:53 +03:00
# 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>     </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)
28 lines
1.0 KiB
C#
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);
|
|
}
|
|
}
|