diff --git a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs index 0eea8b2bae..f71afa7f47 100644 --- a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs +++ b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs @@ -123,9 +123,8 @@ namespace Content.Shared.Chemistry.Reagent [DataField] public float PricePerUnit; - // TODO: Pick the highest reagent for sounds and add sticky to cola, juice, etc. [DataField] - public SoundSpecifier FootstepSound = new SoundCollectionSpecifier("FootstepWater"); + public SoundSpecifier FootstepSound = new SoundCollectionSpecifier("FootstepWater", AudioParams.Default.WithVolume(6)); public FixedPoint2 ReactionTile(TileRef tile, FixedPoint2 reactVolume) { diff --git a/Content.Shared/Fluids/SharedPuddleSystem.cs b/Content.Shared/Fluids/SharedPuddleSystem.cs index 08a7624c4a..59a9c6ef26 100644 --- a/Content.Shared/Fluids/SharedPuddleSystem.cs +++ b/Content.Shared/Fluids/SharedPuddleSystem.cs @@ -1,10 +1,18 @@ using Content.Shared.Chemistry.Components; +using Content.Shared.Chemistry.EntitySystems; +using Content.Shared.Chemistry.Reagent; using Content.Shared.DragDrop; +using Content.Shared.Fluids.Components; +using Content.Shared.Movement.Events; +using Robust.Shared.Prototypes; namespace Content.Shared.Fluids; public abstract class SharedPuddleSystem : EntitySystem { + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; + /// /// The lowest threshold to be considered for puddle sprite states as well as slipperiness of a puddle. /// @@ -19,6 +27,7 @@ public abstract class SharedPuddleSystem : EntitySystem SubscribeLocalEvent(OnDumpCanDropTarget); SubscribeLocalEvent(OnDrainCanDropTarget); SubscribeLocalEvent(OnRefillableCanDropDragged); + SubscribeLocalEvent(OnGetFootstepSound); } private void OnRefillableCanDrag(Entity entity, ref CanDragEvent args) @@ -52,4 +61,18 @@ public abstract class SharedPuddleSystem : EntitySystem args.CanDrop = true; args.Handled = true; } + + private void OnGetFootstepSound(Entity entity, ref GetFootstepSoundEvent args) + { + if (!_solutionContainerSystem.ResolveSolution(entity.Owner, entity.Comp.SolutionName, ref entity.Comp.Solution, + out var solution)) + return; + + var reagentId = solution.GetPrimaryReagentId(); + if (!string.IsNullOrWhiteSpace(reagentId?.Prototype) + && _prototypeManager.TryIndex(reagentId.Value.Prototype, out ReagentPrototype? proto)) + { + args.Sound = proto.FootstepSound; + } + } } diff --git a/Resources/Audio/Effects/Footsteps/attributions.yml b/Resources/Audio/Effects/Footsteps/attributions.yml index 756f8c8408..45872787b7 100644 --- a/Resources/Audio/Effects/Footsteps/attributions.yml +++ b/Resources/Audio/Effects/Footsteps/attributions.yml @@ -56,3 +56,11 @@ license: "CC-BY-SA-4.0" copyright: "Taken and modified from el1n freesound.org" source: "https://freesound.org/people/el1n/sounds/442746/" + +- files: + - gib_step.ogg + - meatslap.ogg + license: "CC-BY-SA-3.0" + copyright: "Taken from https://github.com/tgstation/tgstation" + source: "https://github.com/tgstation/tgstation/blob/34d5ab2e46e3fb4dd9d7475f587d33441df9651c/sound/effects" + \ No newline at end of file diff --git a/Resources/Audio/Effects/Footsteps/gib_step.ogg b/Resources/Audio/Effects/Footsteps/gib_step.ogg new file mode 100644 index 0000000000..3225af318a Binary files /dev/null and b/Resources/Audio/Effects/Footsteps/gib_step.ogg differ diff --git a/Resources/Audio/Effects/Footsteps/meatslap.ogg b/Resources/Audio/Effects/Footsteps/meatslap.ogg new file mode 100644 index 0000000000..01b4bf5716 Binary files /dev/null and b/Resources/Audio/Effects/Footsteps/meatslap.ogg differ diff --git a/Resources/Prototypes/Entities/Effects/puddle.yml b/Resources/Prototypes/Entities/Effects/puddle.yml index dd7f411653..2c845e1d0f 100644 --- a/Resources/Prototypes/Entities/Effects/puddle.yml +++ b/Resources/Prototypes/Entities/Effects/puddle.yml @@ -112,11 +112,6 @@ mode: SnapgridCenter components: - type: Clickable - - type: FootstepModifier - footstepSoundCollection: - collection: FootstepWater - params: - volume: 6 - type: Slippery launchForwardsMultiplier: 2.0 - type: Transform diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml b/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml index 3ffeaaf58e..9984b4c0cf 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/base_drink.yml @@ -36,6 +36,10 @@ amount: 0.1 - !type:PlantAdjustHealth amount: -0.1 + footstepSound: + collection: FootstepSticky + params: + volume: 6 - type: reagent id: BaseAlcohol @@ -62,3 +66,13 @@ amount: 0.25 - !type:PlantAdjustWater amount: 0.7 + +- type: reagent + id: BaseJuice + parent: BaseDrink + abstract: true + flavor: sweet + footstepSound: + collection: FootstepSticky + params: + volume: 6 \ No newline at end of file diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml b/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml index 5f60d76c14..558ecc0e15 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml @@ -83,6 +83,10 @@ metamorphicSprite: sprite: Objects/Consumable/Drinks/grenadineglass.rsi state: icon + footstepSound: + collection: FootstepSticky + params: + volume: 6 - type: reagent id: IcedCoffee @@ -130,6 +134,7 @@ - type: reagent id: JuiceBerryPoison + parent: BaseJuice name: reagent-name-juice-berry-poison group: Drinks desc: reagent-desc-juice-berry-poison @@ -149,6 +154,7 @@ - type: reagent id: Lemonade + parent: BaseJuice name: reagent-name-lemonade group: Drinks desc: reagent-desc-lemonade @@ -246,6 +252,7 @@ - type: reagent id: NuclearCola + parent: BaseSoda name: reagent-name-nuclear-cola group: Drinks desc: reagent-desc-nuclear-cola diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/juice.yml b/Resources/Prototypes/Reagents/Consumable/Drink/juice.yml index 9b6e235eec..ee1492b45e 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/juice.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/juice.yml @@ -1,7 +1,7 @@ - type: reagent id: JuiceApple name: reagent-name-juice-apple - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-apple physicalDesc: reagent-physical-desc-crisp flavor: apple @@ -11,7 +11,7 @@ - type: reagent id: JuiceBanana name: reagent-name-juice-banana - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-banana physicalDesc: reagent-physical-desc-crisp flavor: banana @@ -20,7 +20,7 @@ - type: reagent id: JuiceBerry name: reagent-name-juice-berry - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-berry physicalDesc: reagent-physical-desc-sweet flavor: berry @@ -29,7 +29,7 @@ - type: reagent id: JuiceCarrot name: reagent-name-juice-carrot - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-carrot physicalDesc: reagent-physical-desc-crisp flavor: carrot @@ -49,7 +49,7 @@ - type: reagent id: JuiceGrape name: reagent-name-juice-grape - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-grape physicalDesc: reagent-physical-desc-crisp flavor: juice @@ -58,7 +58,7 @@ - type: reagent id: JuiceLemon name: reagent-name-juice-lemon - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-lemon physicalDesc: reagent-physical-desc-citric flavor: sour @@ -67,7 +67,7 @@ - type: reagent id: JuiceLime name: reagent-name-juice-lime - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-lime physicalDesc: reagent-physical-desc-citric flavor: sour @@ -84,7 +84,7 @@ - type: reagent id: JuiceOrange name: reagent-name-juice-orange - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-orange physicalDesc: reagent-physical-desc-citric flavor: orange @@ -93,7 +93,7 @@ - type: reagent id: JuicePineapple name: reagent-name-juice-pineapple - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-pineapple physicalDesc: reagent-physical-desc-tropical flavor: pineapple @@ -102,7 +102,7 @@ - type: reagent id: JuicePotato name: reagent-name-juice-potato - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-potato physicalDesc: reagent-physical-desc-starchy flavor: potatoes @@ -111,7 +111,7 @@ - type: reagent id: JuiceTomato name: reagent-name-juice-tomato - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-tomato physicalDesc: reagent-physical-desc-saucey flavor: tomato @@ -120,7 +120,7 @@ - type: reagent id: JuiceWatermelon name: reagent-name-juice-watermelon - parent: BaseDrink + parent: BaseJuice desc: reagent-desc-juice-watermelon physicalDesc: reagent-physical-desc-sweet flavor: watermelon diff --git a/Resources/Prototypes/Reagents/biological.yml b/Resources/Prototypes/Reagents/biological.yml index 62d2a42788..d29d5f7e4d 100644 --- a/Resources/Prototypes/Reagents/biological.yml +++ b/Resources/Prototypes/Reagents/biological.yml @@ -38,6 +38,10 @@ plantMetabolism: - !type:PlantAdjustWater amount: 0.5 + footstepSound: + collection: FootstepBlood + params: + volume: 6 - type: reagent parent: Blood @@ -70,6 +74,10 @@ effects: - !type:SatiateHunger factor: 1.5 + footstepSound: + collection: FootstepBlood + params: + volume: 6 - type: reagent parent: Blood @@ -136,6 +144,10 @@ plantMetabolism: - !type:PlantAdjustWater amount: 0.5 + footstepSound: + collection: FootstepBlood + params: + volume: 6 - type: reagent id: Fat @@ -146,6 +158,10 @@ color: "#d8d8b0" physicalDesc: reagent-physical-desc-exotic-smelling slippery: false + footstepSound: + collection: FootstepBlood + params: + volume: 6 - type: reagent id: Vomit @@ -164,3 +180,7 @@ - !type:AdjustReagent reagent: Nutriment amount: 0.1 + footstepSound: + collection: FootstepBlood + params: + volume: 6 \ No newline at end of file diff --git a/Resources/Prototypes/SoundCollections/footsteps.yml b/Resources/Prototypes/SoundCollections/footsteps.yml index 296e638650..e48eeb6450 100644 --- a/Resources/Prototypes/SoundCollections/footsteps.yml +++ b/Resources/Prototypes/SoundCollections/footsteps.yml @@ -184,3 +184,13 @@ id: FootstepSlip files: - /Audio/Effects/slip.ogg + +- type: soundCollection + id: FootstepBlood + files: + - /Audio/Effects/Footsteps/gib_step.ogg + +- type: soundCollection + id: FootstepSticky + files: + - /Audio/Effects/Footsteps/meatslap.ogg \ No newline at end of file diff --git a/Resources/Prototypes/Tiles/floors.yml b/Resources/Prototypes/Tiles/floors.yml index 9d6f197e36..3a80bdddc4 100644 --- a/Resources/Prototypes/Tiles/floors.yml +++ b/Resources/Prototypes/Tiles/floors.yml @@ -1620,7 +1620,7 @@ isSubfloor: false canCrowbar: true footstepSounds: - collection: BarestepCarpet + collection: FootstepBlood itemDrop: FloorTileItemFlesh friction: 0.05 #slippy heatCapacity: 10000