Opening lockers or crates makes sound now.
This commit is contained in:
@@ -9,6 +9,7 @@ using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using System.Linq;
|
||||
using Content.Server.GameObjects.Components.Items.Storage;
|
||||
using Content.Server.GameObjects.Components.Sound;
|
||||
using Content.Shared.GameObjects.Components.Storage;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
@@ -70,7 +71,12 @@ namespace Content.Server.GameObjects.Components
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ModifyComponents();
|
||||
if (Owner.TryGetComponent(out SoundComponent soundComponent))
|
||||
{
|
||||
soundComponent.Play("/Audio/machines/closetclose.ogg");
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenStorage()
|
||||
@@ -78,6 +84,10 @@ namespace Content.Server.GameObjects.Components
|
||||
Open = true;
|
||||
EmptyContents();
|
||||
ModifyComponents();
|
||||
if (Owner.TryGetComponent(out SoundComponent soundComponent))
|
||||
{
|
||||
soundComponent.Play("/Audio/machines/closetopen.ogg");
|
||||
}
|
||||
}
|
||||
|
||||
private void ModifyComponents()
|
||||
|
||||
BIN
Resources/Audio/machines/closetclose.ogg
Normal file
BIN
Resources/Audio/machines/closetclose.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/machines/closetopen.ogg
Normal file
BIN
Resources/Audio/machines/closetopen.ogg
Normal file
Binary file not shown.
@@ -34,6 +34,7 @@
|
||||
- type: StorageVisualizer2D
|
||||
state_open: generic_open
|
||||
state_closed: generic_door
|
||||
- type: Sound
|
||||
|
||||
placement:
|
||||
snap:
|
||||
|
||||
@@ -38,3 +38,4 @@
|
||||
state_open: crate_open
|
||||
state_closed: crate_door
|
||||
|
||||
- type: Sound
|
||||
|
||||
Reference in New Issue
Block a user