actionsurfaceevents.c 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //Digging
  2. class DigPrimarySoundEvent extends DigSoundEventBase
  3. {
  4. void DigPrimarySoundEvent()
  5. {
  6. m_EventType = ESoundEventType.SOUND_COMMON;
  7. m_ID = EReplaceSoundEventID.DIG_PRIMARY;
  8. m_SoundAnimEventClassID = 887;
  9. }
  10. }
  11. class DigSecondarySoundEvent extends DigSoundEventBase
  12. {
  13. void DigSecondarySoundEvent()
  14. {
  15. m_EventType = ESoundEventType.SOUND_COMMON;
  16. m_ID = EReplaceSoundEventID.DIG_SECONDARY;
  17. m_SoundAnimEventClassID = 888;
  18. }
  19. }
  20. class DigSoundEventBase extends ReplaceSoundEventBase
  21. {
  22. override protected void SelectSoundID()
  23. {
  24. string cfg_path = "cfgVehicles " + m_Player.GetItemInHands().GetType() + " AnimEvents " + "Sound " + "SurfaceDig";
  25. if (m_ID == EReplaceSoundEventID.DIG_PRIMARY)
  26. cfg_path = cfg_path + " DigPrimary";
  27. else if (m_ID == EReplaceSoundEventID.DIG_SECONDARY)
  28. cfg_path = cfg_path + " DigSecondary";
  29. m_ReplacedSoundAnimID = GetGame().ConfigGetInt(cfg_path + " " + m_Player.GetSurfaceType());
  30. if (m_ReplacedSoundAnimID == 0)
  31. m_ReplacedSoundAnimID = GetGame().ConfigGetInt(cfg_path + " default");
  32. }
  33. };
  34. //Cleaning hands
  35. class CleanHandsPrimarySoundEvent extends CleanHandsSoundEventBase
  36. {
  37. void CleanHandsPrimarySoundEvent()
  38. {
  39. m_EventType = ESoundEventType.SOUND_COMMON;
  40. m_ID = EReplaceSoundEventID.CLEANHANDS_PRIMARY;
  41. m_SoundAnimEventClassID = 10007;
  42. m_UserString = "StopOnAnimEnd";
  43. }
  44. }
  45. class CleanHandsSecondarySoundEvent extends CleanHandsSoundEventBase
  46. {
  47. void CleanHandsSecondarySoundEvent()
  48. {
  49. m_EventType = ESoundEventType.SOUND_COMMON;
  50. m_ID = EReplaceSoundEventID.CLEANHANDS_SECONDARY;
  51. m_SoundAnimEventClassID = 10006;
  52. m_UserString = "StopOnAnimEnd";
  53. }
  54. }
  55. class CleanHandsSoundEventBase extends ReplaceSoundEventBase
  56. {
  57. override protected void SelectSoundID()
  58. {
  59. string cfg_path = "cfgVehicles " + m_Player.GetType() + " AnimEvents " + "Sound " + "SurfaceCleanHands";
  60. if (m_ID == EReplaceSoundEventID.CLEANHANDS_PRIMARY)
  61. cfg_path = cfg_path + " CleanHandsPrimary";
  62. else if (m_ID == EReplaceSoundEventID.CLEANHANDS_SECONDARY)
  63. cfg_path = cfg_path + " CleanHandsSecondary";
  64. m_ReplacedSoundAnimID = GetGame().ConfigGetInt(cfg_path + " " + m_Player.GetSurfaceType());
  65. if (m_ReplacedSoundAnimID == 0)
  66. m_ReplacedSoundAnimID = GetGame().ConfigGetInt(cfg_path + " default");
  67. }
  68. };