beds.lua 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. -- beds/beds.lua
  2. -- support for MT game translation.
  3. local S = beds.get_translator
  4. -- Fancy shaped bed
  5. beds.register_bed("beds:fancy_bed", {
  6. description = S("Fancy Bed"),
  7. inventory_image = "beds_bed_fancy.png",
  8. wield_image = "beds_bed_fancy.png",
  9. tiles = {
  10. bottom = {
  11. "beds_bed_top1.png",
  12. "beds_bed_under.png",
  13. "beds_bed_side1.png",
  14. "beds_bed_side1.png^[transformFX",
  15. "beds_bed_foot.png",
  16. "beds_bed_foot.png",
  17. },
  18. top = {
  19. "beds_bed_top2.png",
  20. "beds_bed_under.png",
  21. "beds_bed_side2.png",
  22. "beds_bed_side2.png^[transformFX",
  23. "beds_bed_head.png",
  24. "beds_bed_head.png",
  25. }
  26. },
  27. nodebox = {
  28. bottom = {
  29. {-0.5, -0.5, -0.5, -0.375, -0.065, -0.4375},
  30. {0.375, -0.5, -0.5, 0.5, -0.065, -0.4375},
  31. {-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375},
  32. {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5},
  33. {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5},
  34. {-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5},
  35. },
  36. top = {
  37. {-0.5, -0.5, 0.4375, -0.375, 0.1875, 0.5},
  38. {0.375, -0.5, 0.4375, 0.5, 0.1875, 0.5},
  39. {-0.5, 0, 0.4375, 0.5, 0.125, 0.5},
  40. {-0.5, -0.375, 0.4375, 0.5, -0.125, 0.5},
  41. {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5},
  42. {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5},
  43. {-0.4375, -0.3125, -0.5, 0.4375, -0.0625, 0.4375},
  44. }
  45. },
  46. selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
  47. recipe = {
  48. {"", "", "group:stick"},
  49. {"wool:white", "wool:white", "wool:white"},
  50. {"group:wood", "group:wood", "group:wood"},
  51. },
  52. })
  53. -- Simple shaped bed
  54. beds.register_bed("beds:bed", {
  55. description = S("Simple Bed"),
  56. inventory_image = "beds_bed.png",
  57. wield_image = "beds_bed.png",
  58. tiles = {
  59. bottom = {
  60. "beds_bed_top_bottom.png^[transformR90",
  61. "beds_bed_under.png",
  62. "beds_bed_side_bottom_r.png",
  63. "beds_bed_side_bottom_r.png^[transformFX",
  64. "blank.png",
  65. "beds_bed_side_bottom.png"
  66. },
  67. top = {
  68. "beds_bed_top_top.png^[transformR90",
  69. "beds_bed_under.png",
  70. "beds_bed_side_top_r.png",
  71. "beds_bed_side_top_r.png^[transformFX",
  72. "beds_bed_side_top.png",
  73. "blank.png",
  74. }
  75. },
  76. nodebox = {
  77. bottom = {-0.5, -0.5, -0.5, 0.5, 0.0625, 0.5},
  78. top = {-0.5, -0.5, -0.5, 0.5, 0.0625, 0.5},
  79. },
  80. selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.0625, 1.5},
  81. recipe = {
  82. {"wool:white", "wool:white", "wool:white"},
  83. {"group:wood", "group:wood", "group:wood"}
  84. },
  85. })
  86. -- Aliases for PilzAdam's beds mod
  87. minetest.register_alias("beds:bed_bottom_red", "beds:bed_bottom")
  88. minetest.register_alias("beds:bed_top_red", "beds:bed_top")
  89. -- Fuel
  90. minetest.register_craft({
  91. type = "fuel",
  92. recipe = "beds:fancy_bed_bottom",
  93. burntime = 13,
  94. })
  95. minetest.register_craft({
  96. type = "fuel",
  97. recipe = "beds:bed_bottom",
  98. burntime = 12,
  99. })