Crawling Part 1: The Knockdownening (#36881)

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: ScarKy0 <scarky0@onet.eu>
This commit is contained in:
Princess Cheeseballs
2025-07-19 16:54:42 -07:00
committed by GitHub
parent cfb0a95035
commit dec2d42a1d
60 changed files with 1595 additions and 220 deletions

View File

@@ -234,7 +234,7 @@ public abstract partial class SharedStaminaSystem : EntitySystem
/// <summary>
/// Tries to take stamina damage without raising the entity over the crit threshold.
/// </summary>
public bool TryTakeStamina(EntityUid uid, float value, StaminaComponent? component = null, EntityUid? source = null, EntityUid? with = null)
public bool TryTakeStamina(EntityUid uid, float value, StaminaComponent? component = null, EntityUid? source = null, EntityUid? with = null, bool visual = false)
{
// Something that has no Stamina component automatically passes stamina checks
if (!Resolve(uid, ref component, false))
@@ -242,10 +242,10 @@ public abstract partial class SharedStaminaSystem : EntitySystem
var oldStam = component.StaminaDamage;
if (oldStam + value > component.CritThreshold || component.Critical)
if (oldStam + value >= component.CritThreshold || component.Critical)
return false;
TakeStaminaDamage(uid, value, component, source, with, visual: false);
TakeStaminaDamage(uid, value, component, source, with, visual: visual);
return true;
}