sounds.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. function generic_media.node_sound_defaults(table)
  2. table = table or {}
  3. table.footstep = table.footstep or
  4. {name = "", gain = 1.0}
  5. table.dug = table.dug or
  6. {name = "generic_media_dug_node", gain = 0.25}
  7. table.place = table.place or
  8. {name = "generic_media_place_node_hard", gain = 1.0}
  9. return table
  10. end
  11. function generic_media.node_sound_stone_defaults(table)
  12. table = table or {}
  13. table.footstep = table.footstep or
  14. {name = "generic_media_hard_footstep", gain = 0.3}
  15. table.dug = table.dug or
  16. {name = "generic_media_hard_footstep", gain = 1.0}
  17. generic_media.node_sound_defaults(table)
  18. return table
  19. end
  20. function generic_media.node_sound_dirt_defaults(table)
  21. table = table or {}
  22. table.footstep = table.footstep or
  23. {name = "generic_media_dirt_footstep", gain = 0.4}
  24. table.dug = table.dug or
  25. {name = "generic_media_dirt_footstep", gain = 1.0}
  26. table.place = table.place or
  27. {name = "generic_media_place_node", gain = 1.0}
  28. generic_media.node_sound_defaults(table)
  29. return table
  30. end
  31. function generic_media.node_sound_sand_defaults(table)
  32. table = table or {}
  33. table.footstep = table.footstep or
  34. {name = "generic_media_sand_footstep", gain = 0.12}
  35. table.dug = table.dug or
  36. {name = "generic_media_sand_footstep", gain = 0.24}
  37. table.place = table.place or
  38. {name = "generic_media_place_node", gain = 1.0}
  39. generic_media.node_sound_defaults(table)
  40. return table
  41. end
  42. function generic_media.node_sound_gravel_defaults(table)
  43. table = table or {}
  44. table.footstep = table.footstep or
  45. {name = "generic_media_gravel_footstep", gain = 0.4}
  46. table.dug = table.dug or
  47. {name = "generic_media_gravel_footstep", gain = 1.0}
  48. table.place = table.place or
  49. {name = "generic_media_place_node", gain = 1.0}
  50. generic_media.node_sound_defaults(table)
  51. return table
  52. end
  53. function generic_media.node_sound_wood_defaults(table)
  54. table = table or {}
  55. table.footstep = table.footstep or
  56. {name = "generic_media_wood_footstep", gain = 0.3}
  57. table.dug = table.dug or
  58. {name = "generic_media_wood_footstep", gain = 1.0}
  59. generic_media.node_sound_defaults(table)
  60. return table
  61. end
  62. function generic_media.node_sound_leaves_defaults(table)
  63. table = table or {}
  64. table.footstep = table.footstep or
  65. {name = "generic_media_grass_footstep", gain = 0.45}
  66. table.dug = table.dug or
  67. {name = "generic_media_grass_footstep", gain = 0.7}
  68. table.place = table.place or
  69. {name = "generic_media_place_node", gain = 1.0}
  70. generic_media.node_sound_defaults(table)
  71. return table
  72. end
  73. function generic_media.node_sound_glass_defaults(table)
  74. table = table or {}
  75. table.footstep = table.footstep or
  76. {name = "generic_media_glass_footstep", gain = 0.3}
  77. table.dig = table.dig or
  78. {name = "generic_media_glass_footstep", gain = 0.5}
  79. table.dug = table.dug or
  80. {name = "generic_media_break_glass", gain = 1.0}
  81. generic_media.node_sound_defaults(table)
  82. return table
  83. end
  84. function generic_media.node_sound_metal_defaults(table)
  85. table = table or {}
  86. table.footstep = table.footstep or
  87. {name = "generic_media_metal_footstep", gain = 0.4}
  88. table.dig = table.dig or
  89. {name = "generic_media_dig_metal", gain = 0.5}
  90. table.dug = table.dug or
  91. {name = "generic_media_dug_metal", gain = 0.5}
  92. table.place = table.place or
  93. {name = "generic_media_place_node_metal", gain = 0.5}
  94. generic_media.node_sound_defaults(table)
  95. return table
  96. end
  97. function generic_media.node_sound_water_defaults(table)
  98. table = table or {}
  99. table.footstep = table.footstep or
  100. {name = "generic_media_water_footstep", gain = 0.2}
  101. generic_media.node_sound_defaults(table)
  102. return table
  103. end
  104. function generic_media.node_sound_snow_defaults(table)
  105. table = table or {}
  106. table.footstep = table.footstep or
  107. {name = "generic_media_snow_footstep", gain = 0.2}
  108. table.dig = table.dig or
  109. {name = "generic_media_snow_footstep", gain = 0.3}
  110. table.dug = table.dug or
  111. {name = "generic_media_snow_footstep", gain = 0.3}
  112. table.place = table.place or
  113. {name = "generic_media_place_node", gain = 1.0}
  114. generic_media.node_sound_defaults(table)
  115. return table
  116. end
  117. function generic_media.node_sound_moss_defaults(table)
  118. table = table or {}
  119. table.footstep = table.footstep or
  120. {name = "generic_media_sand_footstep", gain = 0.04}
  121. table.dug = table.dug or
  122. {name = "generic_media_sand_footstep", gain = 0.24}
  123. table.place = table.place or
  124. {name = "generic_media_place_node", gain = 1.0}
  125. return table
  126. end
  127. function generic_media.tool_breaks_default()
  128. return "generic_media_tool_breaks"
  129. end