]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Several small SFX tweaks (#28897)
authorLittleNyanCat <littlenyancat204@gmail.com>
Thu, 17 Oct 2024 01:38:02 +0000 (02:38 +0100)
committerGitHub <noreply@github.com>
Thu, 17 Oct 2024 01:38:02 +0000 (20:38 -0500)
* 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>
13 files changed:
Content.Server/Botany/Components/PlantHolderComponent.cs
Content.Server/Botany/Systems/PlantHolderSystem.cs
Content.Server/Nutrition/EntitySystems/DrinkSystem.cs
Content.Server/Nutrition/EntitySystems/FoodSystem.cs
Content.Shared/VendingMachines/VendingMachineComponent.cs
Resources/Audio/Machines/attributions.yml
Resources/Audio/Machines/machine_vend.ogg
Resources/Prototypes/Entities/Clothing/Shoes/boots.yml
Resources/Prototypes/Entities/Clothing/Shoes/specific.yml
Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml
Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml
Resources/Prototypes/Entities/Structures/Machines/Computers/base_structurecomputers.yml
Resources/Prototypes/Entities/Structures/hydro_tray.yml

index 8218bead72cbae7e335c676f2df19bdce0ada2c7..f0661e4a301f8fa69b76c8a34fbcf81eae035dbe 100644 (file)
@@ -1,5 +1,6 @@
 using Content.Shared.Chemistry.Components;
 using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
+using Robust.Shared.Audio;
 
 namespace Content.Server.Botany.Components;
 
@@ -23,6 +24,9 @@ public sealed partial class PlantHolderComponent : Component
     [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
     public TimeSpan LastCycle = TimeSpan.Zero;
 
+    [DataField]
+    public SoundSpecifier? WateringSound;
+
     [DataField]
     public bool UpdateSpriteAfterUpdate;
 
index fa03265692128e2ae8dbad06036e2bc502ab56a0..b17c26137106b8750c97dd9d9217332ad6bc0a76 100644 (file)
@@ -11,6 +11,7 @@ using Content.Shared.Chemistry.Reagent;
 using Content.Shared.Coordinates.Helpers;
 using Content.Shared.Examine;
 using Content.Shared.FixedPoint;
+using Content.Shared.Fluids.Components;
 using Content.Shared.Hands.Components;
 using Content.Shared.IdentityManagement;
 using Content.Shared.Interaction;
@@ -37,7 +38,6 @@ public sealed class PlantHolderSystem : EntitySystem
     [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly PopupSystem _popup = default!;
     [Dependency] private readonly IGameTiming _gameTiming = default!;
-    [Dependency] private readonly SharedPointLightSystem _pointLight = default!;
     [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
     [Dependency] private readonly TagSystem _tagSystem = default!;
     [Dependency] private readonly RandomHelperSystem _randomHelper = default!;
@@ -53,6 +53,7 @@ public sealed class PlantHolderSystem : EntitySystem
         SubscribeLocalEvent<PlantHolderComponent, ExaminedEvent>(OnExamine);
         SubscribeLocalEvent<PlantHolderComponent, InteractUsingEvent>(OnInteractUsing);
         SubscribeLocalEvent<PlantHolderComponent, InteractHandEvent>(OnInteractHand);
+        SubscribeLocalEvent<PlantHolderComponent, SolutionTransferredEvent>(OnSolutionTransferred);
     }
 
     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)
     {
         DoHarvest(entity, args.User, entity.Comp);
index f04d79b47da910cf57f7006e40e0e7552f7ee8ca..90a925e39f145cc7c46973600e02ab35aa277138 100644 (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}");
         }
 
-        _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);
         _stomach.TryTransferSolution(firstStomach.Value.Owner, drained, firstStomach.Value.Comp1);
index d7daf632d661c83742d99d746246167acf6fe99a..158c7f4955c5ad8f02adfecf40b9f006eb750dea 100644 (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}");
         }
 
-        _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
         foreach (var utensil in utensils)
index 50023a023ab1dd93f54eaa7010709574dd58ed2a..f3fe3a1ecdba5d8049515fcc197558ded9594290 100644 (file)
@@ -87,12 +87,13 @@ namespace Content.Shared.VendingMachines
         ///     Sound that plays when ejecting an item
         /// </summary>
         [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")
         {
             Params = new AudioParams
             {
-                Volume = -2f
+                Volume = -4f,
+                Variation = 0.15f
             }
         };
 
index 1b4ea7474160bfa765e810a0c4fd152505a66421..7675162a04d5067d48a0a91220525ca16ea9dd7c 100644 (file)
   - chime.ogg
   - buzz-sigh.ogg
   - buzztwo.ogg
+  - machine_vend.gg
   license: "CC-BY-SA-3.0"
   copyright: "Taken from TG station."
   source: "https://github.com/tgstation/tgstation/tree/d4f678a1772007ff8d7eddd21cf7218c8e07bfc0"
index 8f7c187d0c37c130b4a2094e13755fd7430106dd..92867a1f3d3bd6b5b9a22e766ebeca6590420770 100644 (file)
Binary files a/Resources/Audio/Machines/machine_vend.ogg and b/Resources/Audio/Machines/machine_vend.ogg differ
index fbaeba60470430e845a47046d2fb010e1c43e01d..4223f2217ea40ef45085b34a7629fefcab8335fb 100644 (file)
   - type: FootstepModifier
     footstepSoundCollection:
       collection: FootstepSpurs
+      params:
+        variation: 0.09
 
 - type: entity
   parent: ClothingShoesBootsCowboyBrown
index a4fbe012c52a5bc253f098bb3d155a24d6699dca..87a0c06c4a0b557b5b8ff74729525789a239fc85 100644 (file)
@@ -40,6 +40,8 @@
   - type: FootstepModifier
     footstepSoundCollection:
       collection: FootstepClown
+      params:
+        variation: 0.17
   # for H.O.N.K. construction
   - type: Tag
     tags:
@@ -59,6 +61,8 @@
   - type: FootstepModifier
     footstepSoundCollection:
       collection: FootstepSlip
+      params:
+        variation: 0.10
   - type: Construction
     graph: BananaClownShoes
     node: shoes
@@ -79,6 +83,8 @@
   - type: FootstepModifier
     footstepSoundCollection:
       collection: FootstepClown
+      params:
+        variation: 0.17
   - type: PointLight
     enabled: true
     radius: 3
     - type: FootstepModifier
       footstepSoundCollection:
         collection: FootstepJester
+        params:
+          variation: 0.07
 
 - type: entity
   parent: ClothingShoesClown
   - type: FootstepModifier
     footstepSoundCollection:
       collection: FootstepSkates
+      params:
+        variation: 0.08
index f82f4c43ff7e604dcfd493afdaf2a24f6c14a9d5..5883790b6658a03c2cc9e3274cc84cb963b4539d 100644 (file)
     maxInterval: 12
     sound:
       collection: BikeHorn
+      params:
+        variation: 0.125
   - type: Sprite
     sprite: Mobs/Silicon/Bots/honkbot.rsi
     state: honkbot
     interactFailureString: petting-failure-honkbot
     interactSuccessSound:
       path: /Audio/Items/bikehorn.ogg
+      params:
+        variation: 0.125
 
 - type: entity
   parent: MobHonkBot
   - type: SpamEmitSound
     sound:
       collection: CluwneHorn
+      params:
+        variation: 0.125
   - type: Sprite
     state: jonkbot
   - type: Construction
   - type: InteractionPopup
     interactSuccessSound:
       path: /Audio/Items/brokenbikehorn.ogg
+      params:
+        variation: 0.125
   - type: Vocal
     sounds:
       Unsexed: Cluwne
index 1fbde27e71b0e1d5888c4222836d482d09d6bac1..4c4e44c28cd29eb96363074909355ce70093e4c7 100644 (file)
   - type: FootstepModifier
     footstepSoundCollection:
       collection: FootstepClown
+      params:
+        variation: 0.17
   - type: Mech
     baseState: honker
     openState: honker-open
index 9baca8b4b6b2bf69627c015b7973a12ac9f0c60b..e961cf94d3c8d4cf333dd3646d2221d498554513 100644 (file)
@@ -60,6 +60,8 @@
       collection: Keyboard
       params:
         volume: -1
+        variation: 0.10
+        pitch: 1.10  # low pitch keyboard sounds feel kinda weird
   - type: ContainerContainer
     containers:
       board: !type:Container
index 7224c154f9a74fddfce786dd978cd7f6f12f19d6..b1cbcc8b8630705411608890be8f83178eecbd57 100644 (file)
           False: { visible: false }
   - type: PlantHolder
     drawWarnings: true
+    wateringSound:
+      path: /Audio/Effects/Fluids/slosh.ogg
+      params:
+        volume: -6
+        variation: 0.20
   - type: Destructible
     thresholds:
     - trigger: