chip.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. -- LUALOCALS < ---------------------------------------------------------
  2. local minetest, nodecore
  3. = minetest, nodecore
  4. -- LUALOCALS > ---------------------------------------------------------
  5. local modname = minetest.get_current_modname()
  6. minetest.register_craftitem(modname .. ":chip", {
  7. description = "Stone Chip",
  8. inventory_image = modname .. "_stone.png",
  9. wield_image = "[combine:16x16:0,2=" .. modname .. "_stone.png",
  10. wield_scale = {x = 1.25, y = 1.25, z = 1.75},
  11. sounds = nodecore.sounds("nc_terrain_stony")
  12. })
  13. nodecore.register_craft({
  14. label = "break cobble to chips",
  15. action = "pummel",
  16. indexkeys = {"nc_terrain:cobble_loose"},
  17. nodes = {
  18. {match = "nc_terrain:cobble_loose", replace = "nc_terrain:gravel"}
  19. },
  20. items = {
  21. {name = modname .. ":chip", count = 4, scatter = 5}
  22. },
  23. toolgroups = {cracky = 2},
  24. itemscatter = 5
  25. })
  26. nodecore.register_craft({
  27. label = "break packed cobble to chips",
  28. action = "pummel",
  29. indexkeys = {"nc_terrain:cobble"},
  30. nodes = {
  31. {match = "nc_terrain:cobble", replace = "nc_terrain:gravel"}
  32. },
  33. items = {
  34. {name = modname .. ":chip", count = 4, scatter = 5}
  35. },
  36. toolgroups = {cracky = 4},
  37. itemscatter = 5
  38. })
  39. nodecore.register_craft({
  40. label = "repack chips to cobble",
  41. action = "pummel",
  42. indexkeys = {modname .. ":chip"},
  43. nodes = {
  44. {
  45. match = {name = modname .. ":chip", count = 8},
  46. replace = "nc_terrain:cobble_loose"
  47. }
  48. },
  49. toolgroups = {thumpy = 2}
  50. })