diff --git a/Content.Client/Tips/TippyUIController.cs b/Content.Client/Tips/TippyUIController.cs index 7737a3d698..77c10193a5 100644 --- a/Content.Client/Tips/TippyUIController.cs +++ b/Content.Client/Tips/TippyUIController.cs @@ -104,7 +104,7 @@ public sealed class TippyUIController : UIController ? -WaddleRotation : WaddleRotation; - if (EntityManager.TryGetComponent(_entity, out FootstepModifierComponent? step)) + if (EntityManager.TryGetComponent(_entity, out FootstepModifierComponent? step) && step.FootstepSoundCollection != null) { var audioParams = step.FootstepSoundCollection.Params .AddVolume(-7f) diff --git a/Content.Shared/Movement/Components/FootstepModifierComponent.cs b/Content.Shared/Movement/Components/FootstepModifierComponent.cs index bd7b5377bd..e658f6d948 100644 --- a/Content.Shared/Movement/Components/FootstepModifierComponent.cs +++ b/Content.Shared/Movement/Components/FootstepModifierComponent.cs @@ -9,6 +9,6 @@ namespace Content.Shared.Movement.Components; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class FootstepModifierComponent : Component { - [DataField(required: true), AutoNetworkedField] - public SoundSpecifier FootstepSoundCollection = default!; + [DataField, AutoNetworkedField] + public SoundSpecifier? FootstepSoundCollection; } diff --git a/Content.Shared/Movement/Systems/SharedMoverController.cs b/Content.Shared/Movement/Systems/SharedMoverController.cs index 2bbc2766df..9024f14865 100644 --- a/Content.Shared/Movement/Systems/SharedMoverController.cs +++ b/Content.Shared/Movement/Systems/SharedMoverController.cs @@ -480,7 +480,7 @@ public abstract partial class SharedMoverController : VirtualController if (FootstepModifierQuery.TryComp(uid, out var moverModifier)) { sound = moverModifier.FootstepSoundCollection; - return true; + return sound != null; } if (_entities.TryGetComponent(uid, out NoShoesSilentFootstepsComponent? _) & @@ -493,7 +493,7 @@ public abstract partial class SharedMoverController : VirtualController FootstepModifierQuery.TryComp(shoes, out var modifier)) { sound = modifier.FootstepSoundCollection; - return true; + return sound != null; } return TryGetFootstepSound(uid, xform, shoes != null, out sound, tileDef: tileDef); @@ -514,10 +514,9 @@ public abstract partial class SharedMoverController : VirtualController if (FootstepModifierQuery.TryComp(xform.MapUid, out var modifier)) { sound = modifier.FootstepSoundCollection; - return true; } - return false; + return sound != null; } var position = grid.LocalToTile(xform.Coordinates); @@ -540,7 +539,7 @@ public abstract partial class SharedMoverController : VirtualController if (FootstepModifierQuery.TryComp(maybeFootstep, out var footstep)) { sound = footstep.FootstepSoundCollection; - return true; + return sound != null; } } diff --git a/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml b/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml index ff7d95d643..db34edd1fa 100644 --- a/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml +++ b/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml @@ -134,14 +134,18 @@ - type: Clothing sprite: Clothing/Shoes/Specific/spaceninja.rsi - type: NoSlip + - type: Magboots # always have gravity because le suction cups - type: ClothingSpeedModifier # ninja are masters of sneaking around relatively quickly, won't break cloak walkModifier: 1.1 sprintModifier: 1.3 + - type: FootstepModifier + footstepSoundCollection: + collection: null - type: Unremoveable - type: entity - parent: ClothingShoesMilitaryBase + parent: ClothingShoesBaseButcherable id: ClothingShoesSwat name: swat shoes description: When you want to turn up the heat.