init.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. climbable = true,
  35. tiles = {
  36. {
  37. name = "castle_chandelier.png",
  38. animation = {
  39. type = "vertical_frames",
  40. aspect_w = 16,
  41. aspect_h = 16,
  42. length = 1.0
  43. },
  44. },
  45. },
  46. selection_box = {
  47. type = "fixed",
  48. fixed = {
  49. {0.35,-0.375,0.35,-0.35,0.5,-0.35},
  50. },
  51. },
  52. })
  53. minetest.register_craft({
  54. output = "castle_lighting:chandelier",
  55. recipe = {
  56. {"", "", ""},
  57. {"", "default:steel_ingot", ""},
  58. {"xdecor:candle","xdecor:candle","xdecor:candle"},
  59. }
  60. })
  61. minetest.register_node( "castle_lighting:chandelier_chain", {
  62. drawtype = "plantlike",
  63. description = S("Chandelier Chain"),
  64. paramtype = "light",
  65. wield_image = "castle_chandelier_chain.png",
  66. inventory_image = "castle_chandelier_chain.png",
  67. groups = utility.dig_groups("bigitem", {hanging_node=1}),
  68. sounds = default.node_sound_glass_defaults(),
  69. sunlight_propagates = true,
  70. tiles = {"castle_chandelier_chain.png"},
  71. selection_box = {
  72. type = "fixed",
  73. fixed = {
  74. {0.1,-0.5,0.1,-0.1,0.5,-0.1},
  75. },
  76. },
  77. walkable = false,
  78. climbable = true,
  79. })
  80. minetest.register_craft({
  81. -- Keep output amount consistent with other chains.
  82. output = "castle_lighting:chandelier_chain 2",
  83. recipe = {
  84. {"", "default:steel_ingot", ""},
  85. {"", "", ""},
  86. {"","default:steel_ingot",""},
  87. }
  88. })