tools.lua 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. -- mods/default/tools.lua
  2. -- The hand
  3. minetest.register_item(":", {
  4. type = "none",
  5. wield_image = "wieldhand.png",
  6. wield_scale = {x=1,y=1,z=2.5},
  7. tool_capabilities = {
  8. full_punch_interval = 0.9,
  9. max_drop_level = 0,
  10. groupcaps = {
  11. crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1},
  12. snappy = {times={[3]=0.40}, uses=0, maxlevel=1},
  13. oddly_breakable_by_hand = {times={[1]=3.50,[2]=2.00,[3]=0.70}, uses=0}
  14. },
  15. damage_groups = {fleshy=1},
  16. }
  17. })
  18. --
  19. -- Picks
  20. --
  21. minetest.register_tool("default:pick_wood", {
  22. description = "Wooden Pickaxe",
  23. inventory_image = "default_tool_woodpick.png",
  24. tool_capabilities = {
  25. full_punch_interval = 1.2,
  26. max_drop_level=0,
  27. groupcaps={
  28. cracky = {times={[3]=1.60}, uses=10, maxlevel=1},
  29. },
  30. damage_groups = {fleshy=2},
  31. },
  32. })
  33. minetest.register_tool("default:pick_stone", {
  34. description = "Stone Pickaxe",
  35. inventory_image = "default_tool_stonepick.png",
  36. tool_capabilities = {
  37. full_punch_interval = 1.3,
  38. max_drop_level=0,
  39. groupcaps={
  40. cracky = {times={[2]=2.0, [3]=1.20}, uses=20, maxlevel=1},
  41. },
  42. damage_groups = {fleshy=3},
  43. },
  44. })
  45. minetest.register_tool("default:pick_steel", {
  46. description = "Steel Pickaxe",
  47. inventory_image = "default_tool_steelpick.png",
  48. tool_capabilities = {
  49. full_punch_interval = 1.0,
  50. max_drop_level=1,
  51. groupcaps={
  52. cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=20, maxlevel=2},
  53. },
  54. damage_groups = {fleshy=4},
  55. },
  56. })
  57. minetest.register_tool("default:pick_bronze", {
  58. description = "Bronze Pickaxe",
  59. inventory_image = "default_tool_bronzepick.png",
  60. tool_capabilities = {
  61. full_punch_interval = 1.0,
  62. max_drop_level=1,
  63. groupcaps={
  64. cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=30, maxlevel=2},
  65. },
  66. damage_groups = {fleshy=4},
  67. },
  68. })
  69. --
  70. -- Shovels
  71. --
  72. minetest.register_tool("default:shovel_wood", {
  73. description = "Wooden Shovel",
  74. inventory_image = "default_tool_woodshovel.png",
  75. wield_image = "default_tool_woodshovel.png^[transformR90",
  76. tool_capabilities = {
  77. full_punch_interval = 1.2,
  78. max_drop_level=0,
  79. groupcaps={
  80. crumbly = {times={[1]=3.00, [2]=1.60, [3]=0.60}, uses=10, maxlevel=1},
  81. },
  82. damage_groups = {fleshy=2},
  83. },
  84. })
  85. minetest.register_tool("default:shovel_stone", {
  86. description = "Stone Shovel",
  87. inventory_image = "default_tool_stoneshovel.png",
  88. wield_image = "default_tool_stoneshovel.png^[transformR90",
  89. tool_capabilities = {
  90. full_punch_interval = 1.4,
  91. max_drop_level=0,
  92. groupcaps={
  93. crumbly = {times={[1]=1.80, [2]=1.20, [3]=0.50}, uses=20, maxlevel=1},
  94. },
  95. damage_groups = {fleshy=2},
  96. },
  97. })
  98. minetest.register_tool("default:shovel_steel", {
  99. description = "Steel Shovel",
  100. inventory_image = "default_tool_steelshovel.png",
  101. wield_image = "default_tool_steelshovel.png^[transformR90",
  102. tool_capabilities = {
  103. full_punch_interval = 1.1,
  104. max_drop_level=1,
  105. groupcaps={
  106. crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=30, maxlevel=2},
  107. },
  108. damage_groups = {fleshy=3},
  109. },
  110. })
  111. minetest.register_tool("default:shovel_bronze", {
  112. description = "Bronze Shovel",
  113. inventory_image = "default_tool_bronzeshovel.png",
  114. wield_image = "default_tool_bronzeshovel.png^[transformR90",
  115. tool_capabilities = {
  116. full_punch_interval = 1.1,
  117. max_drop_level=1,
  118. groupcaps={
  119. crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=40, maxlevel=2},
  120. },
  121. damage_groups = {fleshy=3},
  122. },
  123. })
  124. --
  125. -- Axes
  126. --
  127. minetest.register_tool("default:axe_wood", {
  128. description = "Wooden Axe",
  129. inventory_image = "default_tool_woodaxe.png",
  130. tool_capabilities = {
  131. full_punch_interval = 1.0,
  132. max_drop_level=0,
  133. groupcaps={
  134. choppy = {times={[3]=2.00}, uses=10, maxlevel=1},
  135. },
  136. damage_groups = {fleshy=2},
  137. },
  138. })
  139. minetest.register_tool("default:axe_stone", {
  140. description = "Stone Axe",
  141. inventory_image = "default_tool_stoneaxe.png",
  142. tool_capabilities = {
  143. full_punch_interval = 1.2,
  144. max_drop_level=0,
  145. groupcaps={
  146. choppy={times={[2]=2.00, [3]=1.50}, uses=20, maxlevel=1},
  147. },
  148. damage_groups = {fleshy=3},
  149. },
  150. })
  151. minetest.register_tool("default:axe_steel", {
  152. description = "Steel Axe",
  153. inventory_image = "default_tool_steelaxe.png",
  154. tool_capabilities = {
  155. full_punch_interval = 1.0,
  156. max_drop_level=1,
  157. groupcaps={
  158. choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=20, maxlevel=2},
  159. },
  160. damage_groups = {fleshy=4},
  161. },
  162. })
  163. minetest.register_tool("default:axe_bronze", {
  164. description = "Bronze Axe",
  165. inventory_image = "default_tool_bronzeaxe.png",
  166. tool_capabilities = {
  167. full_punch_interval = 1.0,
  168. max_drop_level=1,
  169. groupcaps={
  170. choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=30, maxlevel=2},
  171. },
  172. damage_groups = {fleshy=4},
  173. },
  174. })
  175. --
  176. -- Swords
  177. --
  178. minetest.register_tool("default:sword_wood", {
  179. description = "Wooden Sword",
  180. inventory_image = "default_tool_woodsword.png",
  181. tool_capabilities = {
  182. full_punch_interval = 2,
  183. max_drop_level=0,
  184. groupcaps={
  185. snappy={times={[2]=1.6, [3]=0.40}, uses=10, maxlevel=1},
  186. },
  187. damage_groups = {fleshy=2},
  188. }
  189. })
  190. minetest.register_tool("default:sword_stone", {
  191. description = "Stone Sword",
  192. inventory_image = "default_tool_stonesword.png",
  193. tool_capabilities = {
  194. full_punch_interval = 1.5,
  195. max_drop_level=0,
  196. groupcaps={
  197. snappy={times={[2]=1.4, [3]=0.40}, uses=20, maxlevel=1},
  198. },
  199. damage_groups = {fleshy=4},
  200. }
  201. })
  202. minetest.register_tool("default:sword_steel", {
  203. description = "Steel Sword",
  204. inventory_image = "default_tool_steelsword.png",
  205. tool_capabilities = {
  206. full_punch_interval = 1.05,
  207. max_drop_level=1,
  208. groupcaps={
  209. snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=30, maxlevel=2},
  210. },
  211. damage_groups = {fleshy=6},
  212. }
  213. })
  214. minetest.register_tool("default:sword_bronze", {
  215. description = "Bronze Sword",
  216. inventory_image = "default_tool_bronzesword.png",
  217. tool_capabilities = {
  218. full_punch_interval = 0.9,
  219. max_drop_level=1,
  220. groupcaps={
  221. snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=40, maxlevel=2},
  222. },
  223. damage_groups = {fleshy=6},
  224. }
  225. })