station_pottery_wheel.lua 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. local mortar_table_functions = simplecrafting_lib.generate_table_functions('pottery', {
  2. show_guides = true,
  3. alphabetize_items = true,}
  4. )
  5. local mortar_table_def = {
  6. description = 'Pottery Wheel',
  7. drawtype = 'mesh',
  8. mesh = 'stations_pottery_wheel.obj',
  9. tiles = {'stations_pottery_wheel.png'},
  10. use_texture_alpha = 'opaque',
  11. sounds = default.node_sound_wood_defaults(),
  12. paramtype2 = 'facedir',
  13. paramtype = 'light',
  14. selection_box = {
  15. type = 'fixed',
  16. fixed = {-.5, -.5, -.5, .5, .5, .5}
  17. },
  18. collision_box = {
  19. type = 'fixed',
  20. fixed = {-.5, -.5, -.5, .5, .5, .5}
  21. },
  22. groups = {oddly_breakable_by_hand = 1, choppy=3},
  23. after_place_node = function(pos)
  24. local meta = minetest.get_meta(pos)
  25. meta:set_string('infotext', 'Pottery Wheel')
  26. end,
  27. }
  28. for k, v in pairs(mortar_table_functions) do
  29. mortar_table_def[k] = v
  30. end
  31. minetest.register_node('stations:pottery', mortar_table_def)
  32. local mortar_locked_functions = simplecrafting_lib.generate_table_functions('pottery', {
  33. show_guides = true,
  34. alphabetize_items = true,
  35. protect_inventory = true,}
  36. )
  37. local mortar_locked_def = {
  38. description = 'Pottery Wheel (locked)',
  39. drawtype = 'mesh',
  40. mesh = 'stations_pottery_wheel.obj',
  41. tiles = {'stations_pottery_wheel.png'},
  42. use_texture_alpha = 'opaque',
  43. sounds = default.node_sound_wood_defaults(),
  44. paramtype2 = 'facedir',
  45. paramtype = 'light',
  46. selection_box = {
  47. type = 'fixed',
  48. fixed = {-.5, -.5, -.5, .5, .5, .5}
  49. },
  50. collision_box = {
  51. type = 'fixed',
  52. fixed = {-.5, -.5, -.5, .5, .5, .5}
  53. },
  54. groups = {oddly_breakable_by_hand = 1, choppy=3},
  55. after_place_node = function(pos)
  56. local meta = minetest.get_meta(pos)
  57. meta:set_string('infotext', 'Pottery Wheel (locked)')
  58. end,
  59. }
  60. for k, v in pairs(mortar_locked_functions) do
  61. mortar_locked_def[k] = v
  62. end
  63. minetest.register_node('stations:pottery_locked', mortar_locked_def)
  64. unified_inventory.register_craft_type("pottery", {
  65. description = "Pottery Wheel",
  66. icon = 'stations_pottery_icon.png',
  67. width = 4,
  68. height = 2,
  69. uses_crafting_grid = false
  70. })