tools.lua 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  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. minetest.register_tool("default:pick_mese", {
  70. description = "Mese Pickaxe",
  71. inventory_image = "default_tool_mesepick.png",
  72. tool_capabilities = {
  73. full_punch_interval = 0.9,
  74. max_drop_level=3,
  75. groupcaps={
  76. cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=20, maxlevel=3},
  77. },
  78. damage_groups = {fleshy=5},
  79. },
  80. })
  81. minetest.register_tool("default:pick_diamond", {
  82. description = "Diamond Pickaxe",
  83. inventory_image = "default_tool_diamondpick.png",
  84. tool_capabilities = {
  85. full_punch_interval = 0.9,
  86. max_drop_level=3,
  87. groupcaps={
  88. cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=30, maxlevel=3},
  89. },
  90. damage_groups = {fleshy=5},
  91. },
  92. })
  93. --
  94. -- Shovels
  95. --
  96. minetest.register_tool("default:shovel_wood", {
  97. description = "Wooden Shovel",
  98. inventory_image = "default_tool_woodshovel.png",
  99. wield_image = "default_tool_woodshovel.png^[transformR90",
  100. tool_capabilities = {
  101. full_punch_interval = 1.2,
  102. max_drop_level=0,
  103. groupcaps={
  104. crumbly = {times={[1]=3.00, [2]=1.60, [3]=0.60}, uses=10, maxlevel=1},
  105. },
  106. damage_groups = {fleshy=2},
  107. },
  108. })
  109. minetest.register_tool("default:shovel_stone", {
  110. description = "Stone Shovel",
  111. inventory_image = "default_tool_stoneshovel.png",
  112. wield_image = "default_tool_stoneshovel.png^[transformR90",
  113. tool_capabilities = {
  114. full_punch_interval = 1.4,
  115. max_drop_level=0,
  116. groupcaps={
  117. crumbly = {times={[1]=1.80, [2]=1.20, [3]=0.50}, uses=20, maxlevel=1},
  118. },
  119. damage_groups = {fleshy=2},
  120. },
  121. })
  122. minetest.register_tool("default:shovel_steel", {
  123. description = "Steel Shovel",
  124. inventory_image = "default_tool_steelshovel.png",
  125. wield_image = "default_tool_steelshovel.png^[transformR90",
  126. tool_capabilities = {
  127. full_punch_interval = 1.1,
  128. max_drop_level=1,
  129. groupcaps={
  130. crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=30, maxlevel=2},
  131. },
  132. damage_groups = {fleshy=3},
  133. },
  134. })
  135. minetest.register_tool("default:shovel_bronze", {
  136. description = "Bronze Shovel",
  137. inventory_image = "default_tool_bronzeshovel.png",
  138. wield_image = "default_tool_bronzeshovel.png^[transformR90",
  139. tool_capabilities = {
  140. full_punch_interval = 1.1,
  141. max_drop_level=1,
  142. groupcaps={
  143. crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=40, maxlevel=2},
  144. },
  145. damage_groups = {fleshy=3},
  146. },
  147. })
  148. minetest.register_tool("default:shovel_mese", {
  149. description = "Mese Shovel",
  150. inventory_image = "default_tool_meseshovel.png",
  151. wield_image = "default_tool_meseshovel.png^[transformR90",
  152. tool_capabilities = {
  153. full_punch_interval = 1.0,
  154. max_drop_level=3,
  155. groupcaps={
  156. crumbly = {times={[1]=1.20, [2]=0.60, [3]=0.30}, uses=20, maxlevel=3},
  157. },
  158. damage_groups = {fleshy=4},
  159. },
  160. })
  161. minetest.register_tool("default:shovel_diamond", {
  162. description = "Diamond Shovel",
  163. inventory_image = "default_tool_diamondshovel.png",
  164. wield_image = "default_tool_diamondshovel.png^[transformR90",
  165. tool_capabilities = {
  166. full_punch_interval = 1.0,
  167. max_drop_level=1,
  168. groupcaps={
  169. crumbly = {times={[1]=1.10, [2]=0.50, [3]=0.30}, uses=30, maxlevel=3},
  170. },
  171. damage_groups = {fleshy=4},
  172. },
  173. })
  174. --
  175. -- Axes
  176. --
  177. minetest.register_tool("default:axe_wood", {
  178. description = "Wooden Axe",
  179. inventory_image = "default_tool_woodaxe.png",
  180. tool_capabilities = {
  181. full_punch_interval = 1.0,
  182. max_drop_level=0,
  183. groupcaps={
  184. choppy = {times={[2]=3.00, [3]=2.00}, uses=10, maxlevel=1},
  185. },
  186. damage_groups = {fleshy=2},
  187. },
  188. })
  189. minetest.register_tool("default:axe_stone", {
  190. description = "Stone Axe",
  191. inventory_image = "default_tool_stoneaxe.png",
  192. tool_capabilities = {
  193. full_punch_interval = 1.2,
  194. max_drop_level=0,
  195. groupcaps={
  196. choppy={times={[1]=3.00, [2]=2.00, [3]=1.50}, uses=20, maxlevel=1},
  197. },
  198. damage_groups = {fleshy=3},
  199. },
  200. })
  201. minetest.register_tool("default:axe_steel", {
  202. description = "Steel Axe",
  203. inventory_image = "default_tool_steelaxe.png",
  204. tool_capabilities = {
  205. full_punch_interval = 1.0,
  206. max_drop_level=1,
  207. groupcaps={
  208. choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=20, maxlevel=2},
  209. },
  210. damage_groups = {fleshy=4},
  211. },
  212. })
  213. minetest.register_tool("default:axe_bronze", {
  214. description = "Bronze Axe",
  215. inventory_image = "default_tool_bronzeaxe.png",
  216. tool_capabilities = {
  217. full_punch_interval = 1.0,
  218. max_drop_level=1,
  219. groupcaps={
  220. choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=30, maxlevel=2},
  221. },
  222. damage_groups = {fleshy=4},
  223. },
  224. })
  225. minetest.register_tool("default:axe_mese", {
  226. description = "Mese Axe",
  227. inventory_image = "default_tool_meseaxe.png",
  228. tool_capabilities = {
  229. full_punch_interval = 0.9,
  230. max_drop_level=1,
  231. groupcaps={
  232. choppy={times={[1]=2.20, [2]=1.00, [3]=0.60}, uses=20, maxlevel=3},
  233. },
  234. damage_groups = {fleshy=6},
  235. },
  236. })
  237. minetest.register_tool("default:axe_diamond", {
  238. description = "Diamond Axe",
  239. inventory_image = "default_tool_diamondaxe.png",
  240. tool_capabilities = {
  241. full_punch_interval = 0.9,
  242. max_drop_level=1,
  243. groupcaps={
  244. choppy={times={[1]=2.10, [2]=0.90, [3]=0.50}, uses=30, maxlevel=2},
  245. },
  246. damage_groups = {fleshy=7},
  247. },
  248. })
  249. --
  250. -- Swords
  251. --
  252. minetest.register_tool("default:sword_wood", {
  253. description = "Wooden Sword",
  254. inventory_image = "default_tool_woodsword.png",
  255. tool_capabilities = {
  256. full_punch_interval = 1,
  257. max_drop_level=0,
  258. groupcaps={
  259. snappy={times={[2]=1.6, [3]=0.40}, uses=10, maxlevel=1},
  260. },
  261. damage_groups = {fleshy=2},
  262. }
  263. })
  264. minetest.register_tool("default:sword_stone", {
  265. description = "Stone Sword",
  266. inventory_image = "default_tool_stonesword.png",
  267. tool_capabilities = {
  268. full_punch_interval = 1.2,
  269. max_drop_level=0,
  270. groupcaps={
  271. snappy={times={[2]=1.4, [3]=0.40}, uses=20, maxlevel=1},
  272. },
  273. damage_groups = {fleshy=4},
  274. }
  275. })
  276. minetest.register_tool("default:sword_steel", {
  277. description = "Steel Sword",
  278. inventory_image = "default_tool_steelsword.png",
  279. tool_capabilities = {
  280. full_punch_interval = 0.8,
  281. max_drop_level=1,
  282. groupcaps={
  283. snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=30, maxlevel=2},
  284. },
  285. damage_groups = {fleshy=6},
  286. }
  287. })
  288. minetest.register_tool("default:sword_bronze", {
  289. description = "Bronze Sword",
  290. inventory_image = "default_tool_bronzesword.png",
  291. tool_capabilities = {
  292. full_punch_interval = 0.8,
  293. max_drop_level=1,
  294. groupcaps={
  295. snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=40, maxlevel=2},
  296. },
  297. damage_groups = {fleshy=6},
  298. }
  299. })
  300. minetest.register_tool("default:sword_mese", {
  301. description = "Mese Sword",
  302. inventory_image = "default_tool_mesesword.png",
  303. tool_capabilities = {
  304. full_punch_interval = 0.7,
  305. max_drop_level=1,
  306. groupcaps={
  307. snappy={times={[1]=2.0, [2]=1.00, [3]=0.35}, uses=30, maxlevel=3},
  308. },
  309. damage_groups = {fleshy=7},
  310. }
  311. })
  312. minetest.register_tool("default:sword_diamond", {
  313. description = "Diamond Sword",
  314. inventory_image = "default_tool_diamondsword.png",
  315. tool_capabilities = {
  316. full_punch_interval = 0.7,
  317. max_drop_level=1,
  318. groupcaps={
  319. snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3},
  320. },
  321. damage_groups = {fleshy=8},
  322. }
  323. })