From 3a0174439c6e85e7b7d4bb5742117996db3d0ba9 Mon Sep 17 00:00:00 2001 From: Milon Date: Fri, 20 Sep 2024 05:38:10 +0200 Subject: [PATCH] fix felinids footsteps (#1866) * I am SO fucking smart * fixed random shit from my doing of random shit --- .../Movement/Systems/SharedMoverController.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Content.Shared/Movement/Systems/SharedMoverController.cs b/Content.Shared/Movement/Systems/SharedMoverController.cs index 472d56b1d69..b4d28acece6 100644 --- a/Content.Shared/Movement/Systems/SharedMoverController.cs +++ b/Content.Shared/Movement/Systems/SharedMoverController.cs @@ -9,6 +9,7 @@ using Content.Shared.Mobs.Systems; using Content.Shared.Movement.Components; using Content.Shared.Movement.Events; +using Content.Shared.StepTrigger.Components; // DeltaV - NoShoesSilentFootstepsComponent using Content.Shared.Tag; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; @@ -59,6 +60,7 @@ public abstract partial class SharedMoverController : VirtualController protected EntityQuery NoRotateQuery; protected EntityQuery FootstepModifierQuery; protected EntityQuery MapGridQuery; + protected EntityQuery NoShoesSilentQuery; // DeltaV - NoShoesSilentFootstepsComponent /// /// @@ -88,6 +90,7 @@ public override void Initialize() CanMoveInAirQuery = GetEntityQuery(); FootstepModifierQuery = GetEntityQuery(); MapGridQuery = GetEntityQuery(); + NoShoesSilentQuery = GetEntityQuery(); // DeltaV - NoShoesSilentFootstepsComponent InitializeInput(); InitializeRelay(); @@ -429,6 +432,14 @@ private bool TryGetSound( return false; } + // DeltaV - Don't play the sound if they have no shoes and the component + if (NoShoesSilentQuery.HasComp(uid) & + !_inventory.TryGetSlotEntity(uid, "shoes", out var _)) + { + return false; + } + // End DeltaV code + mobMover.LastPosition = coordinates; if (mobMover.StepSoundDistance < distanceNeeded)