@@ -3,7 +3,6 @@ using System.Threading.Tasks;
|
|||||||
using Content.Server.DoAfter;
|
using Content.Server.DoAfter;
|
||||||
using Content.Shared.ActionBlocker;
|
using Content.Shared.ActionBlocker;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using Content.Shared.Interaction.Events;
|
|
||||||
using Content.Shared.Sound;
|
using Content.Shared.Sound;
|
||||||
using Content.Shared.Tool;
|
using Content.Shared.Tool;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
@@ -44,8 +43,9 @@ namespace Content.Server.Tools.Components
|
|||||||
[DataField("speed")]
|
[DataField("speed")]
|
||||||
public float SpeedModifier { get; set; } = 1;
|
public float SpeedModifier { get; set; } = 1;
|
||||||
|
|
||||||
[DataField("useSound", required: true)]
|
// Some tools don't play a sound on use.
|
||||||
public SoundSpecifier UseSound { get; set; } = default!;
|
[DataField("useSound")]
|
||||||
|
public SoundSpecifier? UseSound { get; set; }
|
||||||
|
|
||||||
public void AddQuality(ToolQuality quality)
|
public void AddQuality(ToolQuality quality)
|
||||||
{
|
{
|
||||||
@@ -96,6 +96,9 @@ namespace Content.Server.Tools.Components
|
|||||||
|
|
||||||
public void PlayUseSound(float volume = -5f)
|
public void PlayUseSound(float volume = -5f)
|
||||||
{
|
{
|
||||||
|
if (UseSound == null)
|
||||||
|
return;
|
||||||
|
|
||||||
SoundSystem.Play(Filter.Pvs(Owner), UseSound.GetSound(), Owner, AudioHelpers.WithVariation(0.15f).WithVolume(volume));
|
SoundSystem.Play(Filter.Pvs(Owner), UseSound.GetSound(), Owner, AudioHelpers.WithVariation(0.15f).WithVolume(volume));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.Act;
|
using Content.Server.Act;
|
||||||
using Content.Server.Atmos;
|
|
||||||
using Content.Server.Atmos.EntitySystems;
|
using Content.Server.Atmos.EntitySystems;
|
||||||
using Content.Server.Chat.Managers;
|
using Content.Server.Chat.Managers;
|
||||||
using Content.Server.Chemistry.Components;
|
using Content.Server.Chemistry.Components;
|
||||||
@@ -14,7 +13,6 @@ using Content.Shared.Chemistry.Reagent;
|
|||||||
using Content.Shared.Chemistry.Solution.Components;
|
using Content.Shared.Chemistry.Solution.Components;
|
||||||
using Content.Shared.Examine;
|
using Content.Shared.Examine;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Notification;
|
|
||||||
using Content.Shared.Notification.Managers;
|
using Content.Shared.Notification.Managers;
|
||||||
using Content.Shared.Sound;
|
using Content.Shared.Sound;
|
||||||
using Content.Shared.Temperature;
|
using Content.Shared.Temperature;
|
||||||
@@ -60,8 +58,8 @@ namespace Content.Server.Tools.Components
|
|||||||
private SolutionContainerComponent? _solutionComponent;
|
private SolutionContainerComponent? _solutionComponent;
|
||||||
private PointLightComponent? _pointLightComponent;
|
private PointLightComponent? _pointLightComponent;
|
||||||
|
|
||||||
[DataField("weldSounds", required: true)]
|
[DataField("weldSounds")]
|
||||||
private SoundSpecifier WeldSounds { get; set; } = default!;
|
private SoundSpecifier WeldSounds { get; set; } = new SoundCollectionSpecifier("Welder");
|
||||||
|
|
||||||
[DataField("welderOffSounds")]
|
[DataField("welderOffSounds")]
|
||||||
private SoundSpecifier WelderOffSounds { get; set; } = new SoundCollectionSpecifier("WelderOff");
|
private SoundSpecifier WelderOffSounds { get; set; } = new SoundCollectionSpecifier("WelderOff");
|
||||||
|
|||||||
4
Resources/Changelog/Parts/welder.yml
Normal file
4
Resources/Changelog/Parts/welder.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
author: Zumorica
|
||||||
|
changes:
|
||||||
|
- type: Fix
|
||||||
|
message: Fixes some tool sounds not playing.
|
||||||
@@ -54,7 +54,8 @@
|
|||||||
- type: Tool
|
- type: Tool
|
||||||
qualities:
|
qualities:
|
||||||
- Screwing
|
- Screwing
|
||||||
useSoundCollection: Screwdriver
|
useSound:
|
||||||
|
collection: Screwdriver
|
||||||
- type: RandomSpriteColor
|
- type: RandomSpriteColor
|
||||||
state: screwdriver
|
state: screwdriver
|
||||||
colors:
|
colors:
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
- ReagentId: WeldingFuel
|
- ReagentId: WeldingFuel
|
||||||
Quantity: 100
|
Quantity: 100
|
||||||
- type: Welder
|
- type: Welder
|
||||||
weldSoundCollection: Welder
|
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
enabled: false
|
enabled: false
|
||||||
radius: 1.5
|
radius: 1.5
|
||||||
|
|||||||
Reference in New Issue
Block a user