Play a loud sound when the door is crowbarred open so everyone is alerted! (Security should know when someonoe is breaking into places without ID card)

TODO: use bump.ogg when wrenching/crowbarring is initiated
This commit is contained in:
Alex Noir
2017-12-17 15:49:16 +03:00
parent 4f7c805a9c
commit a620b06831
6 changed files with 16 additions and 3 deletions
@@ -206,6 +206,9 @@ namespace Barotrauma.Items.Components
public override bool OnPicked(Character picker)
{
SetState(predictedState == null ? !isOpen : !predictedState.Value, false, true); //crowbar function
#if CLIENT
PlaySound(ActionType.OnPicked, item.WorldPosition);
#endif
return false;
}
@@ -89,6 +89,7 @@ namespace Barotrauma.Items.Components
#if CLIENT
if (!GameMain.Instance.LoadingScreenOpen && picker == Character.Controlled) GUI.PlayUISound(GUISoundType.PickItem);
PlaySound(ActionType.OnPicked, item.WorldPosition);
#endif
return true;