Add reagent specific footstep sounds (#24406)
* Add sticky footsteps * Update Resources/Audio/Effects/Footsteps/attributions.yml Co-authored-by: ike709 <ike709@users.noreply.github.com> --------- Co-authored-by: ike709 <ike709@users.noreply.github.com>
This commit is contained in:
@@ -123,9 +123,8 @@ namespace Content.Shared.Chemistry.Reagent
|
|||||||
[DataField]
|
[DataField]
|
||||||
public float PricePerUnit;
|
public float PricePerUnit;
|
||||||
|
|
||||||
// TODO: Pick the highest reagent for sounds and add sticky to cola, juice, etc.
|
|
||||||
[DataField]
|
[DataField]
|
||||||
public SoundSpecifier FootstepSound = new SoundCollectionSpecifier("FootstepWater");
|
public SoundSpecifier FootstepSound = new SoundCollectionSpecifier("FootstepWater", AudioParams.Default.WithVolume(6));
|
||||||
|
|
||||||
public FixedPoint2 ReactionTile(TileRef tile, FixedPoint2 reactVolume)
|
public FixedPoint2 ReactionTile(TileRef tile, FixedPoint2 reactVolume)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,18 @@
|
|||||||
using Content.Shared.Chemistry.Components;
|
using Content.Shared.Chemistry.Components;
|
||||||
|
using Content.Shared.Chemistry.EntitySystems;
|
||||||
|
using Content.Shared.Chemistry.Reagent;
|
||||||
using Content.Shared.DragDrop;
|
using Content.Shared.DragDrop;
|
||||||
|
using Content.Shared.Fluids.Components;
|
||||||
|
using Content.Shared.Movement.Events;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
namespace Content.Shared.Fluids;
|
namespace Content.Shared.Fluids;
|
||||||
|
|
||||||
public abstract class SharedPuddleSystem : EntitySystem
|
public abstract class SharedPuddleSystem : EntitySystem
|
||||||
{
|
{
|
||||||
|
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||||
|
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The lowest threshold to be considered for puddle sprite states as well as slipperiness of a puddle.
|
/// The lowest threshold to be considered for puddle sprite states as well as slipperiness of a puddle.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -19,6 +27,7 @@ public abstract class SharedPuddleSystem : EntitySystem
|
|||||||
SubscribeLocalEvent<DumpableSolutionComponent, CanDropTargetEvent>(OnDumpCanDropTarget);
|
SubscribeLocalEvent<DumpableSolutionComponent, CanDropTargetEvent>(OnDumpCanDropTarget);
|
||||||
SubscribeLocalEvent<DrainableSolutionComponent, CanDropTargetEvent>(OnDrainCanDropTarget);
|
SubscribeLocalEvent<DrainableSolutionComponent, CanDropTargetEvent>(OnDrainCanDropTarget);
|
||||||
SubscribeLocalEvent<RefillableSolutionComponent, CanDropDraggedEvent>(OnRefillableCanDropDragged);
|
SubscribeLocalEvent<RefillableSolutionComponent, CanDropDraggedEvent>(OnRefillableCanDropDragged);
|
||||||
|
SubscribeLocalEvent<PuddleComponent, GetFootstepSoundEvent>(OnGetFootstepSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnRefillableCanDrag(Entity<RefillableSolutionComponent> entity, ref CanDragEvent args)
|
private void OnRefillableCanDrag(Entity<RefillableSolutionComponent> entity, ref CanDragEvent args)
|
||||||
@@ -52,4 +61,18 @@ public abstract class SharedPuddleSystem : EntitySystem
|
|||||||
args.CanDrop = true;
|
args.CanDrop = true;
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnGetFootstepSound(Entity<PuddleComponent> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,3 +56,11 @@
|
|||||||
license: "CC-BY-SA-4.0"
|
license: "CC-BY-SA-4.0"
|
||||||
copyright: "Taken and modified from el1n freesound.org"
|
copyright: "Taken and modified from el1n freesound.org"
|
||||||
source: "https://freesound.org/people/el1n/sounds/442746/"
|
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"
|
||||||
|
|
||||||
BIN
Resources/Audio/Effects/Footsteps/gib_step.ogg
Normal file
BIN
Resources/Audio/Effects/Footsteps/gib_step.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Effects/Footsteps/meatslap.ogg
Normal file
BIN
Resources/Audio/Effects/Footsteps/meatslap.ogg
Normal file
Binary file not shown.
@@ -112,11 +112,6 @@
|
|||||||
mode: SnapgridCenter
|
mode: SnapgridCenter
|
||||||
components:
|
components:
|
||||||
- type: Clickable
|
- type: Clickable
|
||||||
- type: FootstepModifier
|
|
||||||
footstepSoundCollection:
|
|
||||||
collection: FootstepWater
|
|
||||||
params:
|
|
||||||
volume: 6
|
|
||||||
- type: Slippery
|
- type: Slippery
|
||||||
launchForwardsMultiplier: 2.0
|
launchForwardsMultiplier: 2.0
|
||||||
- type: Transform
|
- type: Transform
|
||||||
|
|||||||
@@ -36,6 +36,10 @@
|
|||||||
amount: 0.1
|
amount: 0.1
|
||||||
- !type:PlantAdjustHealth
|
- !type:PlantAdjustHealth
|
||||||
amount: -0.1
|
amount: -0.1
|
||||||
|
footstepSound:
|
||||||
|
collection: FootstepSticky
|
||||||
|
params:
|
||||||
|
volume: 6
|
||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: BaseAlcohol
|
id: BaseAlcohol
|
||||||
@@ -62,3 +66,13 @@
|
|||||||
amount: 0.25
|
amount: 0.25
|
||||||
- !type:PlantAdjustWater
|
- !type:PlantAdjustWater
|
||||||
amount: 0.7
|
amount: 0.7
|
||||||
|
|
||||||
|
- type: reagent
|
||||||
|
id: BaseJuice
|
||||||
|
parent: BaseDrink
|
||||||
|
abstract: true
|
||||||
|
flavor: sweet
|
||||||
|
footstepSound:
|
||||||
|
collection: FootstepSticky
|
||||||
|
params:
|
||||||
|
volume: 6
|
||||||
@@ -83,6 +83,10 @@
|
|||||||
metamorphicSprite:
|
metamorphicSprite:
|
||||||
sprite: Objects/Consumable/Drinks/grenadineglass.rsi
|
sprite: Objects/Consumable/Drinks/grenadineglass.rsi
|
||||||
state: icon
|
state: icon
|
||||||
|
footstepSound:
|
||||||
|
collection: FootstepSticky
|
||||||
|
params:
|
||||||
|
volume: 6
|
||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: IcedCoffee
|
id: IcedCoffee
|
||||||
@@ -130,6 +134,7 @@
|
|||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceBerryPoison
|
id: JuiceBerryPoison
|
||||||
|
parent: BaseJuice
|
||||||
name: reagent-name-juice-berry-poison
|
name: reagent-name-juice-berry-poison
|
||||||
group: Drinks
|
group: Drinks
|
||||||
desc: reagent-desc-juice-berry-poison
|
desc: reagent-desc-juice-berry-poison
|
||||||
@@ -149,6 +154,7 @@
|
|||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: Lemonade
|
id: Lemonade
|
||||||
|
parent: BaseJuice
|
||||||
name: reagent-name-lemonade
|
name: reagent-name-lemonade
|
||||||
group: Drinks
|
group: Drinks
|
||||||
desc: reagent-desc-lemonade
|
desc: reagent-desc-lemonade
|
||||||
@@ -246,6 +252,7 @@
|
|||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: NuclearCola
|
id: NuclearCola
|
||||||
|
parent: BaseSoda
|
||||||
name: reagent-name-nuclear-cola
|
name: reagent-name-nuclear-cola
|
||||||
group: Drinks
|
group: Drinks
|
||||||
desc: reagent-desc-nuclear-cola
|
desc: reagent-desc-nuclear-cola
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceApple
|
id: JuiceApple
|
||||||
name: reagent-name-juice-apple
|
name: reagent-name-juice-apple
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-apple
|
desc: reagent-desc-juice-apple
|
||||||
physicalDesc: reagent-physical-desc-crisp
|
physicalDesc: reagent-physical-desc-crisp
|
||||||
flavor: apple
|
flavor: apple
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceBanana
|
id: JuiceBanana
|
||||||
name: reagent-name-juice-banana
|
name: reagent-name-juice-banana
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-banana
|
desc: reagent-desc-juice-banana
|
||||||
physicalDesc: reagent-physical-desc-crisp
|
physicalDesc: reagent-physical-desc-crisp
|
||||||
flavor: banana
|
flavor: banana
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceBerry
|
id: JuiceBerry
|
||||||
name: reagent-name-juice-berry
|
name: reagent-name-juice-berry
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-berry
|
desc: reagent-desc-juice-berry
|
||||||
physicalDesc: reagent-physical-desc-sweet
|
physicalDesc: reagent-physical-desc-sweet
|
||||||
flavor: berry
|
flavor: berry
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceCarrot
|
id: JuiceCarrot
|
||||||
name: reagent-name-juice-carrot
|
name: reagent-name-juice-carrot
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-carrot
|
desc: reagent-desc-juice-carrot
|
||||||
physicalDesc: reagent-physical-desc-crisp
|
physicalDesc: reagent-physical-desc-crisp
|
||||||
flavor: carrot
|
flavor: carrot
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceGrape
|
id: JuiceGrape
|
||||||
name: reagent-name-juice-grape
|
name: reagent-name-juice-grape
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-grape
|
desc: reagent-desc-juice-grape
|
||||||
physicalDesc: reagent-physical-desc-crisp
|
physicalDesc: reagent-physical-desc-crisp
|
||||||
flavor: juice
|
flavor: juice
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceLemon
|
id: JuiceLemon
|
||||||
name: reagent-name-juice-lemon
|
name: reagent-name-juice-lemon
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-lemon
|
desc: reagent-desc-juice-lemon
|
||||||
physicalDesc: reagent-physical-desc-citric
|
physicalDesc: reagent-physical-desc-citric
|
||||||
flavor: sour
|
flavor: sour
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceLime
|
id: JuiceLime
|
||||||
name: reagent-name-juice-lime
|
name: reagent-name-juice-lime
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-lime
|
desc: reagent-desc-juice-lime
|
||||||
physicalDesc: reagent-physical-desc-citric
|
physicalDesc: reagent-physical-desc-citric
|
||||||
flavor: sour
|
flavor: sour
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceOrange
|
id: JuiceOrange
|
||||||
name: reagent-name-juice-orange
|
name: reagent-name-juice-orange
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-orange
|
desc: reagent-desc-juice-orange
|
||||||
physicalDesc: reagent-physical-desc-citric
|
physicalDesc: reagent-physical-desc-citric
|
||||||
flavor: orange
|
flavor: orange
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuicePineapple
|
id: JuicePineapple
|
||||||
name: reagent-name-juice-pineapple
|
name: reagent-name-juice-pineapple
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-pineapple
|
desc: reagent-desc-juice-pineapple
|
||||||
physicalDesc: reagent-physical-desc-tropical
|
physicalDesc: reagent-physical-desc-tropical
|
||||||
flavor: pineapple
|
flavor: pineapple
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuicePotato
|
id: JuicePotato
|
||||||
name: reagent-name-juice-potato
|
name: reagent-name-juice-potato
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-potato
|
desc: reagent-desc-juice-potato
|
||||||
physicalDesc: reagent-physical-desc-starchy
|
physicalDesc: reagent-physical-desc-starchy
|
||||||
flavor: potatoes
|
flavor: potatoes
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceTomato
|
id: JuiceTomato
|
||||||
name: reagent-name-juice-tomato
|
name: reagent-name-juice-tomato
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-tomato
|
desc: reagent-desc-juice-tomato
|
||||||
physicalDesc: reagent-physical-desc-saucey
|
physicalDesc: reagent-physical-desc-saucey
|
||||||
flavor: tomato
|
flavor: tomato
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: JuiceWatermelon
|
id: JuiceWatermelon
|
||||||
name: reagent-name-juice-watermelon
|
name: reagent-name-juice-watermelon
|
||||||
parent: BaseDrink
|
parent: BaseJuice
|
||||||
desc: reagent-desc-juice-watermelon
|
desc: reagent-desc-juice-watermelon
|
||||||
physicalDesc: reagent-physical-desc-sweet
|
physicalDesc: reagent-physical-desc-sweet
|
||||||
flavor: watermelon
|
flavor: watermelon
|
||||||
|
|||||||
@@ -38,6 +38,10 @@
|
|||||||
plantMetabolism:
|
plantMetabolism:
|
||||||
- !type:PlantAdjustWater
|
- !type:PlantAdjustWater
|
||||||
amount: 0.5
|
amount: 0.5
|
||||||
|
footstepSound:
|
||||||
|
collection: FootstepBlood
|
||||||
|
params:
|
||||||
|
volume: 6
|
||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
parent: Blood
|
parent: Blood
|
||||||
@@ -70,6 +74,10 @@
|
|||||||
effects:
|
effects:
|
||||||
- !type:SatiateHunger
|
- !type:SatiateHunger
|
||||||
factor: 1.5
|
factor: 1.5
|
||||||
|
footstepSound:
|
||||||
|
collection: FootstepBlood
|
||||||
|
params:
|
||||||
|
volume: 6
|
||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
parent: Blood
|
parent: Blood
|
||||||
@@ -136,6 +144,10 @@
|
|||||||
plantMetabolism:
|
plantMetabolism:
|
||||||
- !type:PlantAdjustWater
|
- !type:PlantAdjustWater
|
||||||
amount: 0.5
|
amount: 0.5
|
||||||
|
footstepSound:
|
||||||
|
collection: FootstepBlood
|
||||||
|
params:
|
||||||
|
volume: 6
|
||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: Fat
|
id: Fat
|
||||||
@@ -146,6 +158,10 @@
|
|||||||
color: "#d8d8b0"
|
color: "#d8d8b0"
|
||||||
physicalDesc: reagent-physical-desc-exotic-smelling
|
physicalDesc: reagent-physical-desc-exotic-smelling
|
||||||
slippery: false
|
slippery: false
|
||||||
|
footstepSound:
|
||||||
|
collection: FootstepBlood
|
||||||
|
params:
|
||||||
|
volume: 6
|
||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: Vomit
|
id: Vomit
|
||||||
@@ -164,3 +180,7 @@
|
|||||||
- !type:AdjustReagent
|
- !type:AdjustReagent
|
||||||
reagent: Nutriment
|
reagent: Nutriment
|
||||||
amount: 0.1
|
amount: 0.1
|
||||||
|
footstepSound:
|
||||||
|
collection: FootstepBlood
|
||||||
|
params:
|
||||||
|
volume: 6
|
||||||
@@ -184,3 +184,13 @@
|
|||||||
id: FootstepSlip
|
id: FootstepSlip
|
||||||
files:
|
files:
|
||||||
- /Audio/Effects/slip.ogg
|
- /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
|
||||||
@@ -1620,7 +1620,7 @@
|
|||||||
isSubfloor: false
|
isSubfloor: false
|
||||||
canCrowbar: true
|
canCrowbar: true
|
||||||
footstepSounds:
|
footstepSounds:
|
||||||
collection: BarestepCarpet
|
collection: FootstepBlood
|
||||||
itemDrop: FloorTileItemFlesh
|
itemDrop: FloorTileItemFlesh
|
||||||
friction: 0.05 #slippy
|
friction: 0.05 #slippy
|
||||||
heatCapacity: 10000
|
heatCapacity: 10000
|
||||||
|
|||||||
Reference in New Issue
Block a user