forked from space-syndicate/space-station-14
feat: add RemoveStaminaDamage method for vampire healing
Port RemoveStaminaDamage from wega fork to enable proper stamina reset in vampire abilities. Enables vampires and thralls to have their stamina damage cleared during healing abilities. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -220,8 +220,7 @@ public sealed partial class VampireSystem
|
||||
if (HasComp<StaminaComponent>(uid))
|
||||
{
|
||||
RemoveKnockdown(uid);
|
||||
// TODO: wega fork has RemoveStaminaDamage, wylab doesn't - implement stamina reset
|
||||
// _stamina.RemoveStaminaDamage(uid);
|
||||
_stamina.RemoveStaminaDamage(uid);
|
||||
}
|
||||
|
||||
if (component.CurrentBlood >= 200)
|
||||
@@ -868,8 +867,7 @@ public sealed partial class VampireSystem
|
||||
if (HasComp<StaminaComponent>(uid))
|
||||
{
|
||||
RemoveKnockdown(uid);
|
||||
// TODO: wega fork has RemoveStaminaDamage, wylab doesn't - implement stamina reset
|
||||
// _stamina.RemoveStaminaDamage(uid);
|
||||
_stamina.RemoveStaminaDamage(uid);
|
||||
}
|
||||
|
||||
if (component.CurrentBlood >= 200 && TryComp<DamageableComponent>(uid, out var damageableComponent))
|
||||
@@ -1390,8 +1388,7 @@ public sealed partial class VampireSystem
|
||||
if (HasComp<StaminaComponent>(thrallEntity))
|
||||
{
|
||||
RemoveKnockdown(thrallEntity);
|
||||
// TODO: wega fork has RemoveStaminaDamage, wylab doesn't - implement stamina reset
|
||||
// _stamina.RemoveStaminaDamage(thrallEntity.Owner);
|
||||
_stamina.RemoveStaminaDamage(thrallEntity.Owner);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -452,6 +452,24 @@ public abstract partial class SharedStaminaSystem : EntitySystem
|
||||
_movementMod.TryUpdateMovementStatus(ent.Owner, status.Value, ent.Comp.StunModifierThresholds[closest]);
|
||||
}
|
||||
|
||||
// WyLab-Wega-Start
|
||||
public void RemoveStaminaDamage(Entity<StaminaComponent?> ent)
|
||||
{
|
||||
if (!Resolve(ent, ref ent.Comp))
|
||||
return;
|
||||
|
||||
if (ent.Comp.StaminaDamage >= ent.Comp.CritThreshold)
|
||||
ExitStamCrit(ent);
|
||||
|
||||
ent.Comp.StaminaDamage = 0;
|
||||
AdjustStatus(ent.Owner);
|
||||
RemComp<ActiveStaminaComponent>(ent);
|
||||
_status.TryRemoveStatusEffect(ent, StaminaLow);
|
||||
UpdateStaminaVisuals((ent.Owner, ent.Comp));
|
||||
Dirty(ent);
|
||||
}
|
||||
// WyLab-Wega-End
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class StaminaAnimationEvent(NetEntity entity) : EntityEventArgs
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user