Adds sound to fire extinguisher safety (#4494)
This commit is contained in:
@@ -79,6 +79,9 @@ namespace Content.Server.Fluids.Components
|
|||||||
[DataField("spraySound", required: true)]
|
[DataField("spraySound", required: true)]
|
||||||
public SoundSpecifier SpraySound { get; } = default!;
|
public SoundSpecifier SpraySound { get; } = default!;
|
||||||
|
|
||||||
|
[DataField("safetySound")]
|
||||||
|
public SoundSpecifier SafetySound { get; } = new SoundPathSpecifier("/Audio/Machines/button.ogg");
|
||||||
|
|
||||||
public ReagentUnit CurrentVolume => Owner.GetComponentOrNull<SolutionContainerComponent>()?.CurrentVolume ?? ReagentUnit.Zero;
|
public ReagentUnit CurrentVolume => Owner.GetComponentOrNull<SolutionContainerComponent>()?.CurrentVolume ?? ReagentUnit.Zero;
|
||||||
|
|
||||||
protected override void Initialize()
|
protected override void Initialize()
|
||||||
@@ -200,6 +203,7 @@ namespace Content.Server.Fluids.Components
|
|||||||
|
|
||||||
private void ToggleSafety(IEntity user)
|
private void ToggleSafety(IEntity user)
|
||||||
{
|
{
|
||||||
|
SoundSystem.Play(Filter.Pvs(Owner), SafetySound.GetSound(), Owner, AudioHelpers.WithVariation(0.125f).WithVolume(-4f));
|
||||||
SetSafety(user, !_safety);
|
SetSafety(user, !_safety);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,44 +4,45 @@
|
|||||||
id: FireExtinguisher
|
id: FireExtinguisher
|
||||||
description: It extinguishes fires.
|
description: It extinguishes fires.
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Misc/fire_extinguisher.rsi
|
netsync: false
|
||||||
layers:
|
sprite: Objects/Misc/fire_extinguisher.rsi
|
||||||
- state: fire_extinguisher_closed
|
layers:
|
||||||
map: [ "enum.SprayVisualLayers.Base" ]
|
- state: fire_extinguisher_closed
|
||||||
- type: Item
|
map: [ "enum.SprayVisualLayers.Base" ]
|
||||||
sprite: Objects/Misc/fire_extinguisher.rsi
|
- type: Item
|
||||||
size: 10
|
sprite: Objects/Misc/fire_extinguisher.rsi
|
||||||
- type: SolutionContainer
|
size: 10
|
||||||
maxVol: 100
|
- type: SolutionContainer
|
||||||
caps: Refillable, Drainable
|
maxVol: 100
|
||||||
contents:
|
caps: Refillable, Drainable
|
||||||
reagents:
|
contents:
|
||||||
- ReagentId: Water
|
reagents:
|
||||||
Quantity: 100
|
- ReagentId: Water
|
||||||
- type: ItemCooldown
|
Quantity: 100
|
||||||
- type: Spray
|
- type: ItemCooldown
|
||||||
spraySound:
|
- type: Spray
|
||||||
path: /Audio/Effects/extinguish.ogg
|
spraySound:
|
||||||
sprayedPrototype: ExtinguisherSpray
|
path: /Audio/Effects/extinguish.ogg
|
||||||
hasSafety: true
|
sprayedPrototype: ExtinguisherSpray
|
||||||
vaporAmount: 3
|
hasSafety: true
|
||||||
vaporSpread: 90
|
vaporAmount: 3
|
||||||
sprayVelocity: 2.0
|
vaporSpread: 90
|
||||||
sprayTimeAlive: 1.5
|
sprayVelocity: 2.0
|
||||||
transferAmount: 5
|
sprayTimeAlive: 1.5
|
||||||
impulse: 50.0
|
transferAmount: 5
|
||||||
- type: FireExtinguisher
|
impulse: 50.0
|
||||||
- type: MeleeWeapon
|
- type: FireExtinguisher
|
||||||
damage: 10
|
- type: MeleeWeapon
|
||||||
damageType: Blunt
|
damage: 10
|
||||||
hitSound:
|
damageType: Blunt
|
||||||
path: /Audio/Weapons/smash.ogg
|
hitSound:
|
||||||
- type: Appearance
|
path: /Audio/Weapons/smash.ogg
|
||||||
visuals:
|
- type: Appearance
|
||||||
- type: SprayVisualizer
|
visuals:
|
||||||
safety_on_state: fire_extinguisher_closed
|
- type: SprayVisualizer
|
||||||
safety_off_state: fire_extinguisher_open
|
safety_on_state: fire_extinguisher_closed
|
||||||
|
safety_off_state: fire_extinguisher_open
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: extinguisher spray
|
name: extinguisher spray
|
||||||
@@ -49,24 +50,24 @@
|
|||||||
parent: Vapor
|
parent: Vapor
|
||||||
abstract: true
|
abstract: true
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Effects/extinguisherSpray.rsi
|
sprite: Effects/extinguisherSpray.rsi
|
||||||
layers:
|
layers:
|
||||||
- state: extinguish
|
- state: extinguish
|
||||||
map: [ "enum.VaporVisualLayers.Base" ]
|
map: [ "enum.VaporVisualLayers.Base" ]
|
||||||
- type: Physics
|
- type: Physics
|
||||||
bodyType: Dynamic
|
bodyType: Dynamic
|
||||||
fixtures:
|
fixtures:
|
||||||
- shape:
|
- shape:
|
||||||
!type:PhysShapeAabb
|
!type:PhysShapeAabb
|
||||||
bounds: "-0.25,-0.25,0.25,0.25"
|
bounds: "-0.25,-0.25,0.25,0.25"
|
||||||
hard: false
|
hard: false
|
||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable
|
- MobImpassable
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
visuals:
|
visuals:
|
||||||
- type: VaporVisualizer
|
- type: VaporVisualizer
|
||||||
animation_delay: 0.8
|
animation_delay: 0.8
|
||||||
animation_state: extinguish
|
animation_state: extinguish
|
||||||
|
|||||||
Reference in New Issue
Block a user