From 9cc44a75f1eecac7a35799ed62442de530f602d1 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Fri, 17 Jan 2025 17:55:23 +0100 Subject: [PATCH] Add check to TryStandUp which validates if an entity can even get up --- Content.Shared/_White/Standing/SharedLayingDownSystem.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Content.Shared/_White/Standing/SharedLayingDownSystem.cs b/Content.Shared/_White/Standing/SharedLayingDownSystem.cs index c772a1cb3f5..48e0d64237f 100644 --- a/Content.Shared/_White/Standing/SharedLayingDownSystem.cs +++ b/Content.Shared/_White/Standing/SharedLayingDownSystem.cs @@ -126,6 +126,14 @@ standingState.CurrentState is not StandingState.Lying || HasComp(uid)) return false; + // DeltaV + // Don't allow users to start trying to stand if they couldn't stand anyway + var msg = new StandAttemptEvent(); + RaiseLocalEvent(uid, msg, false); + if (msg.Cancelled) + return false; + // DeltaV + var args = new DoAfterArgs(EntityManager, uid, layingDown.StandingUpTime, new StandingUpDoAfterEvent(), uid) { BreakOnHandChange = false,