Skip to content

Commit

Permalink
I am SO fucking smart
Browse files Browse the repository at this point in the history
  • Loading branch information
MilonPL committed Sep 19, 2024
1 parent 8d5425e commit 3ad68c5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Content.Shared/Movement/Systems/SharedMoverController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -59,6 +60,7 @@ public abstract partial class SharedMoverController : VirtualController
protected EntityQuery<NoRotateOnMoveComponent> NoRotateQuery;
protected EntityQuery<FootstepModifierComponent> FootstepModifierQuery;
protected EntityQuery<MapGridComponent> MapGridQuery;
protected EntityQuery<NoShoesSilentFootstepsComponent> NoShoesSilentQuery; // DeltaV - NoShoesSilentFootstepsComponent

/// <summary>
/// <see cref="CCVars.StopSpeed"/>
Expand Down Expand Up @@ -88,6 +90,7 @@ public override void Initialize()
CanMoveInAirQuery = GetEntityQuery<CanMoveInAirComponent>();
FootstepModifierQuery = GetEntityQuery<FootstepModifierComponent>();
MapGridQuery = GetEntityQuery<MapGridComponent>();
NoShoesSilentQuery = GetEntityQuery<NoShoesSilentFootstepsComponent>(); // DeltaV - NoShoesSilentFootstepsComponent

InitializeInput();
InitializeRelay();
Expand Down Expand Up @@ -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.TryComp(uid, out var _) &
!_inventory.TryGetSlotEntity(uid, "shoes", out var _))
{
return false;
}
// End DeltaV code

mobMover.LastPosition = coordinates;

if (mobMover.StepSoundDistance < distanceNeeded)
Expand Down

0 comments on commit 3ad68c5

Please sign in to comment.