init.lua 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. -- internationalization boilerplate
  2. local MP = minetest.get_modpath(minetest.get_current_modname())
  3. local S, NS = dofile(MP.."/intllib.lua")
  4. castle_lighting = {}
  5. dofile(MP.."/brasier.lua")
  6. minetest.register_node("castle_lighting:light",{
  7. drawtype = "glasslike",
  8. description = S("Light Block"),
  9. sunlight_propagates = true,
  10. light_source = 14,
  11. tiles = {"castle_street_light.png"},
  12. groups = utility.dig_groups("glass"),
  13. sounds = default.node_sound_glass_defaults(),
  14. paramtype = "light",
  15. })
  16. minetest.register_craft({
  17. output = "castle_lighting:light",
  18. recipe = {
  19. {"group:stick", "default:glass", "group:stick"},
  20. {"default:glass", "xdecor:lantern", "default:glass"},
  21. {"group:stick", "default:glass", "group:stick"},
  22. }
  23. })
  24. minetest.register_node( "castle_lighting:chandelier", {
  25. drawtype = "plantlike",
  26. description = S("Chandelier"),
  27. paramtype = "light",
  28. wield_image = "castle_chandelier_wield.png",
  29. inventory_image = "castle_chandelier_wield.png",
  30. groups = utility.dig_groups("bigitem", {hanging_node=1}),
  31. sounds = default.node_sound_glass_defaults(),
  32. sunlight_propagates = true,
  33. light_source = 14,
  34. tiles = {
  35. {
  36. name = "castle_chandelier.png",
  37. animation = {
  38. type = "vertical_frames",
  39. aspect_w = 16,
  40. aspect_h = 16,
  41. length = 1.0
  42. },
  43. },
  44. },
  45. selection_box = {
  46. type = "fixed",
  47. fixed = {
  48. {0.35,-0.375,0.35,-0.35,0.5,-0.35},
  49. },
  50. },
  51. })
  52. minetest.register_craft({
  53. output = "castle_lighting:chandelier",
  54. recipe = {
  55. {"", "", ""},
  56. {"", "default:steel_ingot", ""},
  57. {"xdecor:candle","xdecor:candle","xdecor:candle"},
  58. }
  59. })
  60. minetest.register_node( "castle_lighting:chandelier_chain", {
  61. drawtype = "plantlike",
  62. description = S("Chandelier Chain"),
  63. paramtype = "light",
  64. wield_image = "castle_chandelier_chain.png",
  65. inventory_image = "castle_chandelier_chain.png",
  66. groups = utility.dig_groups("bigitem", {hanging_node=1}),
  67. sounds = default.node_sound_glass_defaults(),
  68. sunlight_propagates = true,
  69. tiles = {"castle_chandelier_chain.png"},
  70. selection_box = {
  71. type = "fixed",
  72. fixed = {
  73. {0.1,-0.5,0.1,-0.1,0.5,-0.1},
  74. },
  75. },
  76. })
  77. minetest.register_craft({
  78. -- Keep output amount consistent with other chains.
  79. output = "castle_lighting:chandelier_chain 2",
  80. recipe = {
  81. {"", "default:steel_ingot", ""},
  82. {"", "", ""},
  83. {"","default:steel_ingot",""},
  84. }
  85. })