mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-16 21:17:39 +03:00
silent footsteps for ninja (#33280)
* waow * nice suggestion * nullable sound * fix stuff --------- Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com> Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> (cherry picked from commit 4ddd7d3c5f514e667f5caf4c28b5710542cfe75c)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user