init.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. if not minetest.global_exists("basictools") then basictools = {} end
  2. basictools.modpath = minetest.get_modpath("basictools")
  3. minetest.register_tool(":default:pick_wood", {
  4. description = "Wooden Pickaxe",
  5. inventory_image = "default_tool_woodpick.png",
  6. tool_capabilities = tooldata["pick_wood"],
  7. sounds = {breaks = "basictools_tool_breaks"},
  8. groups = {flammable = 2, not_repaired_by_anvil = 1},
  9. })
  10. minetest.register_tool(":default:pick_stone", {
  11. description = "Stone Pickaxe",
  12. inventory_image = "default_tool_stonepick.png",
  13. tool_capabilities = tooldata["pick_stone"],
  14. sounds = {breaks = "basictools_tool_breaks"},
  15. groups = {not_repaired_by_anvil = 1},
  16. })
  17. minetest.register_tool(":default:pick_steel", {
  18. description = "Iron Pickaxe",
  19. inventory_image = "default_tool_steelpick.png",
  20. tool_capabilities = tooldata["pick_steel"],
  21. sounds = {breaks = "basictools_tool_breaks"},
  22. })
  23. minetest.register_tool(":default:pick_bronze", {
  24. description = "Copper Pickaxe",
  25. inventory_image = "default_tool_bronzepick.png",
  26. tool_capabilities = tooldata["pick_bronze"],
  27. sounds = {breaks = "basictools_tool_breaks"},
  28. })
  29. minetest.register_tool(":default:pick_bronze2", {
  30. description = "Bronze Pickaxe",
  31. inventory_image = "default_tool_bronzepick2.png",
  32. tool_capabilities = tooldata["pick_bronze2"],
  33. sounds = {breaks = "basictools_tool_breaks"},
  34. })
  35. minetest.register_tool(":default:pick_mese", {
  36. description = "Mese Pickaxe",
  37. inventory_image = "default_tool_mesepick.png",
  38. tool_capabilities = tooldata["pick_mese"],
  39. sounds = {breaks = "basictools_tool_breaks"},
  40. })
  41. minetest.register_tool(":default:pick_diamond", {
  42. description = "Diamond Pickaxe",
  43. inventory_image = "default_tool_diamondpick.png",
  44. tool_capabilities = tooldata["pick_diamond"],
  45. sounds = {breaks = "basictools_tool_breaks"},
  46. })
  47. minetest.register_tool(":default:shovel_stone", {
  48. description = "Stone Shovel",
  49. inventory_image = "default_tool_stoneshovel.png",
  50. wield_image = "default_tool_stoneshovel.png^[transformR90",
  51. tool_capabilities = tooldata["shovel_stone"],
  52. sounds = {breaks = "basictools_tool_breaks"},
  53. groups = {not_repaired_by_anvil = 1},
  54. })
  55. minetest.register_tool(":default:shovel_steel", {
  56. description = "Iron Shovel",
  57. inventory_image = "default_tool_steelshovel.png",
  58. wield_image = "default_tool_steelshovel.png^[transformR90",
  59. tool_capabilities = tooldata["shovel_steel"],
  60. sounds = {breaks = "basictools_tool_breaks"},
  61. })
  62. minetest.register_tool(":default:shovel_bronze", {
  63. description = "Copper Shovel",
  64. inventory_image = "default_tool_bronzeshovel.png",
  65. wield_image = "default_tool_bronzeshovel.png^[transformR90",
  66. tool_capabilities = tooldata["shovel_bronze"],
  67. sounds = {breaks = "basictools_tool_breaks"},
  68. })
  69. minetest.register_tool(":default:shovel_bronze2", {
  70. description = "Bronze Shovel",
  71. inventory_image = "default_tool_bronzeshovel2.png",
  72. wield_image = "default_tool_bronzeshovel2.png^[transformR90",
  73. tool_capabilities = tooldata["shovel_bronze2"],
  74. sounds = {breaks = "basictools_tool_breaks"},
  75. })
  76. minetest.register_tool(":default:shovel_mese", {
  77. description = "Mese Shovel",
  78. inventory_image = "default_tool_meseshovel.png",
  79. wield_image = "default_tool_meseshovel.png^[transformR90",
  80. tool_capabilities = tooldata["shovel_mese"],
  81. sounds = {breaks = "basictools_tool_breaks"},
  82. })
  83. minetest.register_tool(":default:shovel_diamond", {
  84. description = "Diamond Shovel",
  85. inventory_image = "default_tool_diamondshovel.png",
  86. wield_image = "default_tool_diamondshovel.png^[transformR90",
  87. tool_capabilities = tooldata["shovel_diamond"],
  88. sounds = {breaks = "basictools_tool_breaks"},
  89. })
  90. minetest.register_tool(":default:axe_stone", {
  91. description = "Stone Axe",
  92. inventory_image = "default_tool_stoneaxe.png",
  93. tool_capabilities = tooldata["axe_stone"],
  94. sounds = {
  95. breaks = "basictools_tool_breaks",
  96. punch_use_air = "sword_swipe_hard",
  97. },
  98. groups = {not_repaired_by_anvil = 1},
  99. })
  100. minetest.register_tool(":default:axe_steel", {
  101. description = "Iron Axe",
  102. inventory_image = "default_tool_steelaxe.png",
  103. tool_capabilities = tooldata["axe_steel"],
  104. sounds = {
  105. breaks = "basictools_tool_breaks",
  106. punch_use_air = "sword_swipe_metal",
  107. _punch_mob = "sword_flesh",
  108. },
  109. })
  110. minetest.register_tool(":default:axe_bronze", {
  111. description = "Copper Axe",
  112. inventory_image = "default_tool_bronzeaxe.png",
  113. tool_capabilities = tooldata["axe_bronze"],
  114. sounds = {
  115. breaks = "basictools_tool_breaks",
  116. punch_use_air = "sword_swipe_metal",
  117. _punch_mob = "sword_flesh",
  118. },
  119. })
  120. minetest.register_tool(":default:axe_bronze2", {
  121. description = "Bronze Axe",
  122. inventory_image = "default_tool_bronzeaxe2.png",
  123. tool_capabilities = tooldata["axe_bronze2"],
  124. sounds = {
  125. breaks = "basictools_tool_breaks",
  126. punch_use_air = "sword_swipe_metal",
  127. _punch_mob = "sword_flesh",
  128. },
  129. })
  130. minetest.register_tool(":default:axe_mese", {
  131. description = "Mese Axe",
  132. inventory_image = "default_tool_meseaxe.png",
  133. tool_capabilities = tooldata["axe_mese"],
  134. sounds = {
  135. breaks = "basictools_tool_breaks",
  136. punch_use_air = "sword_swipe_metal",
  137. _punch_mob = "sword_flesh",
  138. },
  139. })
  140. minetest.register_tool(":default:axe_diamond", {
  141. description = "Diamond Axe",
  142. inventory_image = "default_tool_diamondaxe.png",
  143. tool_capabilities = tooldata["axe_diamond"],
  144. sounds = {
  145. breaks = "basictools_tool_breaks",
  146. punch_use_air = "sword_swipe_metal",
  147. _punch_mob = "sword_flesh",
  148. },
  149. })
  150. minetest.register_tool(":default:sword_stone", {
  151. description = "Stone Sword",
  152. inventory_image = "default_tool_stonesword.png",
  153. tool_capabilities = tooldata["sword_stone"],
  154. sounds = {breaks = "basictools_tool_breaks"},
  155. groups = {not_repaired_by_anvil = 1},
  156. sounds = {
  157. breaks = "basictools_tool_breaks",
  158. punch_use_air = "sword_swipe_hard",
  159. },
  160. })
  161. minetest.register_tool(":default:sword_steel", {
  162. description = "Iron Sword",
  163. inventory_image = "default_tool_steelsword.png",
  164. tool_capabilities = tooldata["sword_steel"],
  165. sounds = {
  166. breaks = "basictools_tool_breaks",
  167. punch_use_air = "sword_swipe_metal",
  168. _punch_mob = "sword_flesh",
  169. },
  170. })
  171. minetest.register_tool(":default:sword_bronze", {
  172. description = "Copper Sword",
  173. inventory_image = "default_tool_bronzesword.png",
  174. tool_capabilities = tooldata["sword_bronze"],
  175. sounds = {
  176. breaks = "basictools_tool_breaks",
  177. punch_use_air = "sword_swipe_metal",
  178. _punch_mob = "sword_flesh",
  179. },
  180. })
  181. minetest.register_tool(":default:sword_bronze2", {
  182. description = "Bronze Sword",
  183. inventory_image = "default_tool_bronzesword2.png",
  184. tool_capabilities = tooldata["sword_bronze2"],
  185. sounds = {
  186. breaks = "basictools_tool_breaks",
  187. punch_use_air = "sword_swipe_metal",
  188. _punch_mob = "sword_flesh",
  189. },
  190. })
  191. minetest.register_tool(":default:sword_mese", {
  192. description = "Mese Sword",
  193. inventory_image = "default_tool_mesesword.png",
  194. tool_capabilities = tooldata["sword_mese"],
  195. sounds = {
  196. breaks = "basictools_tool_breaks",
  197. punch_use_air = "sword_swipe_metal",
  198. _punch_mob = "sword_flesh",
  199. },
  200. })
  201. minetest.register_tool(":default:sword_diamond", {
  202. description = "Diamond Sword",
  203. inventory_image = "default_tool_diamondsword.png",
  204. tool_capabilities = tooldata["sword_diamond"],
  205. sounds = {
  206. breaks = "basictools_tool_breaks",
  207. punch_use_air = "sword_swipe_metal",
  208. _punch_mob = "sword_flesh",
  209. },
  210. })
  211. minetest.register_craft({
  212. output = 'default:pick_wood',
  213. recipe = {
  214. {'group:wood', 'group:wood', 'group:wood'},
  215. {'', 'group:stick', ''},
  216. {'', 'group:stick', ''},
  217. },
  218. })
  219. minetest.register_craft({
  220. output = 'default:pick_stone',
  221. recipe = {
  222. {'group:native_stone', 'group:native_stone', 'group:native_stone'},
  223. {'', 'group:stick', ''},
  224. {'', 'group:stick', ''},
  225. }
  226. })
  227. minetest.register_craft({
  228. output = 'default:pick_steel',
  229. recipe = {
  230. {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  231. {'', 'group:stick', ''},
  232. {'', 'group:stick', ''},
  233. }
  234. })
  235. minetest.register_craft({
  236. output = 'default:pick_bronze',
  237. recipe = {
  238. {'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
  239. {'', 'group:stick', ''},
  240. {'', 'group:stick', ''},
  241. }
  242. })
  243. minetest.register_craft({
  244. output = 'default:pick_bronze2',
  245. recipe = {
  246. {'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
  247. {'', 'group:stick', ''},
  248. {'', 'group:stick', ''},
  249. }
  250. })
  251. minetest.register_craft({
  252. output = 'default:pick_mese',
  253. recipe = {
  254. {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
  255. {'', 'darkage:iron_stick', ''},
  256. {'', 'darkage:iron_stick', ''},
  257. }
  258. })
  259. minetest.register_craft({
  260. output = 'default:pick_diamond',
  261. recipe = {
  262. {'default:diamond', 'default:diamond', 'default:diamond'},
  263. {'', 'farming:string', ''},
  264. {'', 'default:pick_steel', ''},
  265. }
  266. })
  267. minetest.register_craft({
  268. output = 'default:shovel_stone',
  269. recipe = {
  270. {'group:native_stone'},
  271. {'group:stick'},
  272. {'group:stick'},
  273. }
  274. })
  275. minetest.register_craft({
  276. output = 'default:shovel_steel',
  277. recipe = {
  278. {'default:steel_ingot'},
  279. {'group:stick'},
  280. {'group:stick'},
  281. }
  282. })
  283. minetest.register_craft({
  284. output = 'default:shovel_bronze',
  285. recipe = {
  286. {'default:copper_ingot'},
  287. {'group:stick'},
  288. {'group:stick'},
  289. }
  290. })
  291. minetest.register_craft({
  292. output = 'default:shovel_bronze2',
  293. recipe = {
  294. {'default:bronze_ingot'},
  295. {'group:stick'},
  296. {'group:stick'},
  297. }
  298. })
  299. minetest.register_craft({
  300. output = 'default:shovel_mese',
  301. recipe = {
  302. {'default:mese_crystal'},
  303. {'darkage:iron_stick'},
  304. {'darkage:iron_stick'},
  305. }
  306. })
  307. minetest.register_craft({
  308. output = 'default:shovel_diamond',
  309. recipe = {
  310. {'default:diamond'},
  311. {'farming:string'},
  312. {'default:shovel_steel'},
  313. }
  314. })
  315. minetest.register_craft({
  316. output = 'default:axe_stone',
  317. recipe = {
  318. {'group:native_stone', 'group:native_stone'},
  319. {'group:native_stone', 'group:stick'},
  320. {'', 'group:stick'},
  321. }
  322. })
  323. minetest.register_craft({
  324. output = 'default:axe_steel',
  325. recipe = {
  326. {'default:steel_ingot', 'default:steel_ingot'},
  327. {'default:steel_ingot', 'group:stick'},
  328. {'', 'group:stick'},
  329. }
  330. })
  331. minetest.register_craft({
  332. output = 'default:axe_bronze',
  333. recipe = {
  334. {'default:copper_ingot', 'default:copper_ingot'},
  335. {'default:copper_ingot', 'group:stick'},
  336. {'', 'group:stick'},
  337. }
  338. })
  339. minetest.register_craft({
  340. output = 'default:axe_bronze2',
  341. recipe = {
  342. {'default:bronze_ingot', 'default:bronze_ingot'},
  343. {'default:bronze_ingot', 'group:stick'},
  344. {'', 'group:stick'},
  345. }
  346. })
  347. minetest.register_craft({
  348. output = 'default:axe_mese',
  349. recipe = {
  350. {'default:mese_crystal', 'default:mese_crystal'},
  351. {'default:mese_crystal', 'darkage:iron_stick'},
  352. {'', 'darkage:iron_stick'},
  353. }
  354. })
  355. minetest.register_craft({
  356. output = 'default:axe_diamond',
  357. recipe = {
  358. {'default:diamond', 'default:diamond'},
  359. {'default:diamond', 'farming:string'},
  360. {'', 'default:axe_steel'},
  361. }
  362. })
  363. minetest.register_craft({
  364. output = 'default:axe_stone',
  365. recipe = {
  366. {'group:native_stone', 'group:native_stone'},
  367. {'group:stick', 'group:native_stone'},
  368. {'group:stick', ''},
  369. }
  370. })
  371. minetest.register_craft({
  372. output = 'default:axe_steel',
  373. recipe = {
  374. {'default:steel_ingot', 'default:steel_ingot'},
  375. {'group:stick', 'default:steel_ingot'},
  376. {'group:stick', ''},
  377. }
  378. })
  379. minetest.register_craft({
  380. output = 'default:axe_bronze',
  381. recipe = {
  382. {'default:copper_ingot', 'default:copper_ingot'},
  383. {'group:stick', 'default:copper_ingot'},
  384. {'group:stick', ''},
  385. }
  386. })
  387. minetest.register_craft({
  388. output = 'default:axe_bronze2',
  389. recipe = {
  390. {'default:bronze_ingot', 'default:bronze_ingot'},
  391. {'group:stick', 'default:bronze_ingot'},
  392. {'group:stick', ''},
  393. }
  394. })
  395. minetest.register_craft({
  396. output = 'default:axe_mese',
  397. recipe = {
  398. {'default:mese_crystal', 'default:mese_crystal'},
  399. {'darkage:iron_stick', 'default:mese_crystal'},
  400. {'darkage:iron_stick', ''},
  401. }
  402. })
  403. minetest.register_craft({
  404. output = 'default:axe_diamond',
  405. recipe = {
  406. {'default:diamond', 'default:diamond'},
  407. {'farming:string', 'default:diamond'},
  408. {'default:axe_steel', ''},
  409. }
  410. })
  411. minetest.register_craft({
  412. output = 'default:sword_stone',
  413. recipe = {
  414. {'group:native_stone'},
  415. {'group:native_stone'},
  416. {'group:stick'},
  417. }
  418. })
  419. minetest.register_craft({
  420. output = 'default:sword_steel',
  421. recipe = {
  422. {'default:steel_ingot'},
  423. {'default:steel_ingot'},
  424. {'group:stick'},
  425. }
  426. })
  427. minetest.register_craft({
  428. output = 'default:sword_bronze',
  429. recipe = {
  430. {'default:copper_ingot'},
  431. {'default:copper_ingot'},
  432. {'group:stick'},
  433. }
  434. })
  435. minetest.register_craft({
  436. output = 'default:sword_bronze2',
  437. recipe = {
  438. {'default:bronze_ingot'},
  439. {'default:bronze_ingot'},
  440. {'group:stick'},
  441. }
  442. })
  443. minetest.register_craft({
  444. output = 'default:sword_mese',
  445. recipe = {
  446. {'default:mese_crystal'},
  447. {'default:mese_crystal'},
  448. {'darkage:iron_stick'},
  449. }
  450. })
  451. minetest.register_craft({
  452. output = 'default:sword_diamond',
  453. recipe = {
  454. {'', 'default:diamond', ''},
  455. {'farming:string', 'default:diamond', 'farming:string'},
  456. {'', 'default:sword_steel', ''},
  457. }
  458. })