Several small SFX tweaks (#28897)

* Several small sfx tweaks

* fix small yml oopsie

* Redo the basin code to use events

* now uses an event for when the transfer is successful, not when there's just an attempt

* forgot to remove this

* Update Content.Server/Botany/Components/PlantHolderComponent.cs

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>

* Update Content.Server/Botany/Systems/PlantHolderSystem.cs

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>

* adds sound variations to shoes as well

* variations on honkbots and the H.O.N.K mech

* Update Content.Server/Botany/Systems/PlantHolderSystem.cs

* Update Content.Server/Botany/Systems/PlantHolderSystem.cs

* fix compile issue

* oops forgot to delete this

* cleanup

---------

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
LittleNyanCat
2024-10-17 02:38:02 +01:00
committed by GitHub
parent dec9ff69ec
commit c027919618
13 changed files with 45 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Audio;
namespace Content.Server.Botany.Components; namespace Content.Server.Botany.Components;
@@ -23,6 +24,9 @@ public sealed partial class PlantHolderComponent : Component
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan LastCycle = TimeSpan.Zero; public TimeSpan LastCycle = TimeSpan.Zero;
[DataField]
public SoundSpecifier? WateringSound;
[DataField] [DataField]
public bool UpdateSpriteAfterUpdate; public bool UpdateSpriteAfterUpdate;

View File

@@ -11,6 +11,7 @@ using Content.Shared.Chemistry.Reagent;
using Content.Shared.Coordinates.Helpers; using Content.Shared.Coordinates.Helpers;
using Content.Shared.Examine; using Content.Shared.Examine;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using Content.Shared.Fluids.Components;
using Content.Shared.Hands.Components; using Content.Shared.Hands.Components;
using Content.Shared.IdentityManagement; using Content.Shared.IdentityManagement;
using Content.Shared.Interaction; using Content.Shared.Interaction;
@@ -37,7 +38,6 @@ public sealed class PlantHolderSystem : EntitySystem
[Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly PopupSystem _popup = default!; [Dependency] private readonly PopupSystem _popup = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly SharedPointLightSystem _pointLight = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
[Dependency] private readonly TagSystem _tagSystem = default!; [Dependency] private readonly TagSystem _tagSystem = default!;
[Dependency] private readonly RandomHelperSystem _randomHelper = default!; [Dependency] private readonly RandomHelperSystem _randomHelper = default!;
@@ -53,6 +53,7 @@ public sealed class PlantHolderSystem : EntitySystem
SubscribeLocalEvent<PlantHolderComponent, ExaminedEvent>(OnExamine); SubscribeLocalEvent<PlantHolderComponent, ExaminedEvent>(OnExamine);
SubscribeLocalEvent<PlantHolderComponent, InteractUsingEvent>(OnInteractUsing); SubscribeLocalEvent<PlantHolderComponent, InteractUsingEvent>(OnInteractUsing);
SubscribeLocalEvent<PlantHolderComponent, InteractHandEvent>(OnInteractHand); SubscribeLocalEvent<PlantHolderComponent, InteractHandEvent>(OnInteractHand);
SubscribeLocalEvent<PlantHolderComponent, SolutionTransferredEvent>(OnSolutionTransferred);
} }
public override void Update(float frameTime) public override void Update(float frameTime)
@@ -320,6 +321,10 @@ public sealed class PlantHolderSystem : EntitySystem
} }
} }
private void OnSolutionTransferred(Entity<PlantHolderComponent> ent, ref SolutionTransferredEvent args)
{
_audio.PlayPvs(ent.Comp.WateringSound, ent.Owner);
}
private void OnInteractHand(Entity<PlantHolderComponent> entity, ref InteractHandEvent args) private void OnInteractHand(Entity<PlantHolderComponent> entity, ref InteractHandEvent args)
{ {
DoHarvest(entity, args.User, entity.Comp); DoHarvest(entity, args.User, entity.Comp);

View File

@@ -317,7 +317,7 @@ public sealed class DrinkSystem : SharedDrinkSystem
_adminLogger.Add(LogType.Ingestion, LogImpact.Low, $"{ToPrettyString(args.User):target} drank {ToPrettyString(entity.Owner):drink}"); _adminLogger.Add(LogType.Ingestion, LogImpact.Low, $"{ToPrettyString(args.User):target} drank {ToPrettyString(entity.Owner):drink}");
} }
_audio.PlayPvs(entity.Comp.UseSound, args.Target.Value, AudioParams.Default.WithVolume(-2f)); _audio.PlayPvs(entity.Comp.UseSound, args.Target.Value, AudioParams.Default.WithVolume(-2f).WithVariation(0.25f));
_reaction.DoEntityReaction(args.Target.Value, solution, ReactionMethod.Ingestion); _reaction.DoEntityReaction(args.Target.Value, solution, ReactionMethod.Ingestion);
_stomach.TryTransferSolution(firstStomach.Value.Owner, drained, firstStomach.Value.Comp1); _stomach.TryTransferSolution(firstStomach.Value.Owner, drained, firstStomach.Value.Comp1);

View File

@@ -296,7 +296,7 @@ public sealed class FoodSystem : EntitySystem
_adminLogger.Add(LogType.Ingestion, LogImpact.Low, $"{ToPrettyString(args.User):target} ate {ToPrettyString(entity.Owner):food}"); _adminLogger.Add(LogType.Ingestion, LogImpact.Low, $"{ToPrettyString(args.User):target} ate {ToPrettyString(entity.Owner):food}");
} }
_audio.PlayPvs(entity.Comp.UseSound, args.Target.Value, AudioParams.Default.WithVolume(-1f)); _audio.PlayPvs(entity.Comp.UseSound, args.Target.Value, AudioParams.Default.WithVolume(-1f).WithVariation(0.20f));
// Try to break all used utensils // Try to break all used utensils
foreach (var utensil in utensils) foreach (var utensil in utensils)

View File

@@ -87,12 +87,13 @@ namespace Content.Shared.VendingMachines
/// Sound that plays when ejecting an item /// Sound that plays when ejecting an item
/// </summary> /// </summary>
[DataField("soundVend")] [DataField("soundVend")]
// Grabbed from: https://github.com/discordia-space/CEV-Eris/blob/f702afa271136d093ddeb415423240a2ceb212f0/sound/machines/vending_drop.ogg // Grabbed from: https://github.com/tgstation/tgstation/blob/d34047a5ae911735e35cd44a210953c9563caa22/sound/machines/machine_vend.ogg
public SoundSpecifier SoundVend = new SoundPathSpecifier("/Audio/Machines/machine_vend.ogg") public SoundSpecifier SoundVend = new SoundPathSpecifier("/Audio/Machines/machine_vend.ogg")
{ {
Params = new AudioParams Params = new AudioParams
{ {
Volume = -2f Volume = -4f,
Variation = 0.15f
} }
}; };

View File

@@ -163,6 +163,7 @@
- chime.ogg - chime.ogg
- buzz-sigh.ogg - buzz-sigh.ogg
- buzztwo.ogg - buzztwo.ogg
- machine_vend.gg
license: "CC-BY-SA-3.0" license: "CC-BY-SA-3.0"
copyright: "Taken from TG station." copyright: "Taken from TG station."
source: "https://github.com/tgstation/tgstation/tree/d4f678a1772007ff8d7eddd21cf7218c8e07bfc0" source: "https://github.com/tgstation/tgstation/tree/d4f678a1772007ff8d7eddd21cf7218c8e07bfc0"

View File

@@ -204,6 +204,8 @@
- type: FootstepModifier - type: FootstepModifier
footstepSoundCollection: footstepSoundCollection:
collection: FootstepSpurs collection: FootstepSpurs
params:
variation: 0.09
- type: entity - type: entity
parent: ClothingShoesBootsCowboyBrown parent: ClothingShoesBootsCowboyBrown

View File

@@ -40,6 +40,8 @@
- type: FootstepModifier - type: FootstepModifier
footstepSoundCollection: footstepSoundCollection:
collection: FootstepClown collection: FootstepClown
params:
variation: 0.17
# for H.O.N.K. construction # for H.O.N.K. construction
- type: Tag - type: Tag
tags: tags:
@@ -59,6 +61,8 @@
- type: FootstepModifier - type: FootstepModifier
footstepSoundCollection: footstepSoundCollection:
collection: FootstepSlip collection: FootstepSlip
params:
variation: 0.10
- type: Construction - type: Construction
graph: BananaClownShoes graph: BananaClownShoes
node: shoes node: shoes
@@ -79,6 +83,8 @@
- type: FootstepModifier - type: FootstepModifier
footstepSoundCollection: footstepSoundCollection:
collection: FootstepClown collection: FootstepClown
params:
variation: 0.17
- type: PointLight - type: PointLight
enabled: true enabled: true
radius: 3 radius: 3
@@ -215,6 +221,8 @@
- type: FootstepModifier - type: FootstepModifier
footstepSoundCollection: footstepSoundCollection:
collection: FootstepJester collection: FootstepJester
params:
variation: 0.07
- type: entity - type: entity
parent: ClothingShoesClown parent: ClothingShoesClown
@@ -274,3 +282,5 @@
- type: FootstepModifier - type: FootstepModifier
footstepSoundCollection: footstepSoundCollection:
collection: FootstepSkates collection: FootstepSkates
params:
variation: 0.08

View File

@@ -166,6 +166,8 @@
maxInterval: 12 maxInterval: 12
sound: sound:
collection: BikeHorn collection: BikeHorn
params:
variation: 0.125
- type: Sprite - type: Sprite
sprite: Mobs/Silicon/Bots/honkbot.rsi sprite: Mobs/Silicon/Bots/honkbot.rsi
state: honkbot state: honkbot
@@ -210,6 +212,8 @@
interactFailureString: petting-failure-honkbot interactFailureString: petting-failure-honkbot
interactSuccessSound: interactSuccessSound:
path: /Audio/Items/bikehorn.ogg path: /Audio/Items/bikehorn.ogg
params:
variation: 0.125
- type: entity - type: entity
parent: MobHonkBot parent: MobHonkBot
@@ -220,6 +224,8 @@
- type: SpamEmitSound - type: SpamEmitSound
sound: sound:
collection: CluwneHorn collection: CluwneHorn
params:
variation: 0.125
- type: Sprite - type: Sprite
state: jonkbot state: jonkbot
- type: Construction - type: Construction
@@ -235,6 +241,8 @@
- type: InteractionPopup - type: InteractionPopup
interactSuccessSound: interactSuccessSound:
path: /Audio/Items/brokenbikehorn.ogg path: /Audio/Items/brokenbikehorn.ogg
params:
variation: 0.125
- type: Vocal - type: Vocal
sounds: sounds:
Unsexed: Cluwne Unsexed: Cluwne

View File

@@ -167,6 +167,8 @@
- type: FootstepModifier - type: FootstepModifier
footstepSoundCollection: footstepSoundCollection:
collection: FootstepClown collection: FootstepClown
params:
variation: 0.17
- type: Mech - type: Mech
baseState: honker baseState: honker
openState: honker-open openState: honker-open

View File

@@ -60,6 +60,8 @@
collection: Keyboard collection: Keyboard
params: params:
volume: -1 volume: -1
variation: 0.10
pitch: 1.10 # low pitch keyboard sounds feel kinda weird
- type: ContainerContainer - type: ContainerContainer
containers: containers:
board: !type:Container board: !type:Container

View File

@@ -67,6 +67,11 @@
False: { visible: false } False: { visible: false }
- type: PlantHolder - type: PlantHolder
drawWarnings: true drawWarnings: true
wateringSound:
path: /Audio/Effects/Fluids/slosh.ogg
params:
volume: -6
variation: 0.20
- type: Destructible - type: Destructible
thresholds: thresholds:
- trigger: - trigger: