diff --git a/Content.Shared/Body/Components/BodyComponent.cs b/Content.Shared/Body/Components/BodyComponent.cs
index 4ddfbdf979..670aee12bc 100644
--- a/Content.Shared/Body/Components/BodyComponent.cs
+++ b/Content.Shared/Body/Components/BodyComponent.cs
@@ -44,4 +44,10 @@ public sealed partial class BodyComponent : Component
[DataField, AutoNetworkedField]
public bool ThermalVisibility = true;
+
+ ///
+ /// WWDP; Minimal move speed regardless of any bodyparts
+ ///
+ [DataField, AutoNetworkedField]
+ public float MinimumMovementSpeed = 1f;
}
diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs b/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs
index 7e8b58751e..695f199542 100644
--- a/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs
+++ b/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs
@@ -20,6 +20,7 @@ using Content.Shared.Containers.ItemSlots;
using Content.Shared.Humanoid;
using Content.Shared.Inventory;
using Content.Shared.Random;
+using Content.Shared.Traits.Assorted.Components;
namespace Content.Shared.Body.Systems;
@@ -708,8 +709,17 @@ public partial class SharedBodySystem
}
var walkSpeed = 0f;
- var sprintSpeed = 0f;
+ var sprintSpeed= 0f;
var acceleration = 0f;
+ // WWDP edit - minimal movement speed
+ var minspeed = body.MinimumMovementSpeed;
+
+ if (HasComp(bodyId))
+ {
+ Movement.ChangeBaseSpeed(bodyId, minspeed, minspeed, MovementSpeedModifierComponent.DefaultAcceleration, movement);
+ return;
+ }
+
foreach (var legEntity in body.LegEntities)
{
if (!TryComp(legEntity, out var legModifier))
@@ -719,8 +729,9 @@ public partial class SharedBodySystem
sprintSpeed += legModifier.SprintSpeed;
acceleration += legModifier.Acceleration;
}
- walkSpeed /= body.RequiredLegs;
- sprintSpeed /= body.RequiredLegs;
+ walkSpeed = Math.Max(minspeed, walkSpeed / body.RequiredLegs);
+ sprintSpeed = Math.Max(minspeed, sprintSpeed / body.RequiredLegs);
+ // WWDP edit end
acceleration /= body.RequiredLegs;
Movement.ChangeBaseSpeed(bodyId, walkSpeed, sprintSpeed, acceleration, movement);
}
diff --git a/Content.Shared/Standing/SharedLayingDownSystem.cs b/Content.Shared/Standing/SharedLayingDownSystem.cs
index eceede326a..1d16fa836e 100644
--- a/Content.Shared/Standing/SharedLayingDownSystem.cs
+++ b/Content.Shared/Standing/SharedLayingDownSystem.cs
@@ -17,6 +17,8 @@ using Robust.Shared.Map;
using Robust.Shared.Player;
using Robust.Shared.Serialization;
using Content.Shared.Movement.Components;
+using Content.Shared.Traits.Assorted.Components;
+
namespace Content.Shared.Standing;
@@ -159,6 +161,7 @@ public abstract class SharedLayingDownSystem : EntitySystem
|| !TryComp(uid, out var body)
|| body.LegEntities.Count < body.RequiredLegs
|| HasComp(uid)
+ || HasComp(uid) // WWDP
|| TryComp(uid, out var movement) && movement.CurrentWalkSpeed == 0)
return false;
diff --git a/Content.Shared/Traits/Assorted/Systems/LegsParalyzedSystem.cs b/Content.Shared/Traits/Assorted/Systems/LegsParalyzedSystem.cs
index 0c4bd83a92..b51511c757 100644
--- a/Content.Shared/Traits/Assorted/Systems/LegsParalyzedSystem.cs
+++ b/Content.Shared/Traits/Assorted/Systems/LegsParalyzedSystem.cs
@@ -20,13 +20,18 @@ public sealed class LegsParalyzedSystem : EntitySystem
SubscribeLocalEvent(OnBuckled);
SubscribeLocalEvent(OnUnbuckled);
SubscribeLocalEvent(OnThrowPushbackAttempt);
- SubscribeLocalEvent(OnUpdateCanMoveEvent);
+ //SubscribeLocalEvent(OnUpdateCanMoveEvent); // WWDP
}
private void OnStartup(EntityUid uid, Components.LegsParalyzedComponent component, ComponentStartup args)
{
// TODO: In future probably must be surgery related wound
- _movementSpeedModifierSystem.ChangeBaseSpeed(uid, 0, 0, 20);
+
+ // WWDP edit start
+ //_movementSpeedModifierSystem.ChangeBaseSpeed(uid, 0, 0, 20);
+ _standingSystem.Down(uid);
+ _bodySystem.UpdateMovementSpeed(uid);
+ // WWDP edit end
}
private void OnShutdown(EntityUid uid, Components.LegsParalyzedComponent component, ComponentShutdown args)
@@ -39,7 +44,8 @@ public sealed class LegsParalyzedSystem : EntitySystem
private void OnUnbuckled(EntityUid uid, Components.LegsParalyzedComponent component, ref UnbuckledEvent args) => _standingSystem.Down(uid);
- private void OnUpdateCanMoveEvent(EntityUid uid, Components.LegsParalyzedComponent component, UpdateCanMoveEvent args) => args.Cancel();
+ // WWDP disabled since there is a minimal move speed
+ // private void OnUpdateCanMoveEvent(EntityUid uid, Components.LegsParalyzedComponent component, UpdateCanMoveEvent args) => args.Cancel();
private void OnThrowPushbackAttempt(EntityUid uid, Components.LegsParalyzedComponent component, ThrowPushbackAttemptEvent args) => args.Cancel();
}
diff --git a/Resources/Prototypes/_Goobstation/Traits/disabilities.yml b/Resources/Prototypes/_Goobstation/Traits/disabilities.yml
index 4490ea8202..18e93605e6 100644
--- a/Resources/Prototypes/_Goobstation/Traits/disabilities.yml
+++ b/Resources/Prototypes/_Goobstation/Traits/disabilities.yml
@@ -19,7 +19,7 @@
components:
- type: BuckleOnMapInit
prototype: VehicleWheelchair
-# - type: LegsStartParalyzed # unnecessary if you just can't move at all
- - type: TraitSpeedModifier # makes inability to walk unfixable
- sprintModifier: 0.0
- walkModifier: 0.0
+ - type: LegsParalyzed # WWDP - now works and is untreatable IC
+ # - type: TraitSpeedModifier # WWDP
+ # sprintModifier: 0.1
+ # walkModifier: 0.1