5 ref SCR_AudioSourceConfiguration m_AudioSourceConfiguration;
8 private vector m_vSoundOffset;
10 private AudioHandle m_AudioHandle = AudioHandle.Invalid;
15 override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
17 if (s_onToiletFlushed)
18 s_onToiletFlushed.Invoke(
GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(pUserEntity));
21 if (!soundManagerEntity)
32 pOwnerEntity.GetTransform(mat);
33 mat[3] = pOwnerEntity.CoordToParent(m_vSoundOffset);
35 soundManagerEntity.PlayAudioSource(audioSource, mat);
37 m_AudioHandle = audioSource.m_AudioHandle;
43 if (!s_onToiletFlushed)
46 return s_onToiletFlushed;
50 override bool GetActionNameScript(out
string outName)
52 outName =
"#AR-UserAction_FlushToilet";
57 override bool CanBePerformedScript(IEntity user)
59 return AudioSystem.IsSoundPlayed(m_AudioHandle);
65 AudioSystem.TerminateSound(m_AudioHandle);