Crematorium now makes a noise on start and during cremation (#4459)
This commit is contained in:
@@ -35,13 +35,15 @@ namespace Content.Server.Morgue.Components
|
|||||||
{
|
{
|
||||||
public override string Name => "CrematoriumEntityStorage";
|
public override string Name => "CrematoriumEntityStorage";
|
||||||
|
|
||||||
|
[DataField("cremateStartSound")] private SoundSpecifier _cremateStartSound = new SoundPathSpecifier("/Audio/Items/lighter1.ogg");
|
||||||
|
[DataField("crematingSound")] private SoundSpecifier _crematingSound = new SoundPathSpecifier("/Audio/Effects/burning.ogg");
|
||||||
[DataField("cremateFinishSound")] private SoundSpecifier _cremateFinishSound = new SoundPathSpecifier("/Audio/Machines/ding.ogg");
|
[DataField("cremateFinishSound")] private SoundSpecifier _cremateFinishSound = new SoundPathSpecifier("/Audio/Machines/ding.ogg");
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
public bool Cooking { get; private set; }
|
public bool Cooking { get; private set; }
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
private int _burnMilis = 3000;
|
private int _burnMilis = 5000;
|
||||||
|
|
||||||
private CancellationTokenSource? _cremateCancelToken;
|
private CancellationTokenSource? _cremateCancelToken;
|
||||||
|
|
||||||
@@ -83,6 +85,8 @@ namespace Content.Server.Morgue.Components
|
|||||||
if (Cooking) return;
|
if (Cooking) return;
|
||||||
if (Open) return;
|
if (Open) return;
|
||||||
|
|
||||||
|
SoundSystem.Play(Filter.Pvs(Owner), _cremateStartSound.GetSound(), Owner);
|
||||||
|
|
||||||
Cremate();
|
Cremate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,6 +98,8 @@ namespace Content.Server.Morgue.Components
|
|||||||
Appearance?.SetData(CrematoriumVisuals.Burning, true);
|
Appearance?.SetData(CrematoriumVisuals.Burning, true);
|
||||||
Cooking = true;
|
Cooking = true;
|
||||||
|
|
||||||
|
SoundSystem.Play(Filter.Pvs(Owner), _crematingSound.GetSound(), Owner);
|
||||||
|
|
||||||
_cremateCancelToken?.Cancel();
|
_cremateCancelToken?.Cancel();
|
||||||
|
|
||||||
_cremateCancelToken = new CancellationTokenSource();
|
_cremateCancelToken = new CancellationTokenSource();
|
||||||
|
|||||||
BIN
Resources/Audio/Effects/burning.ogg
Normal file
BIN
Resources/Audio/Effects/burning.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user