straw.lua 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. minetest.register_alias_force("cottages:straw", "farming:straw")
  2. minetest.register_alias_force("castle:straw", "farming:straw")
  3. minetest.register_alias_force("darkage:straw", "farming:straw")
  4. minetest.register_alias_force("cottages:straw_bale", "castle_farming:bound_straw")
  5. minetest.register_alias_force("darkage:straw_bale", "castle_farming:bound_straw")
  6. minetest.register_alias_force("castle:bound_straw", "castle_farming:bound_straw")
  7. -- internationalization boilerplate
  8. local MP = minetest.get_modpath(minetest.get_current_modname())
  9. local S, NS = dofile(MP.."/intllib.lua")
  10. minetest.register_node("castle_farming:bound_straw", {
  11. description = S("Bound Straw"),
  12. drawtype = "normal",
  13. tiles = {"castle_straw_bale.png"},
  14. groups = {choppy=4, flammable=1, oddly_breakable_by_hand=3},
  15. sounds = default.node_sound_leaves_defaults(),
  16. paramtype = "light",
  17. })
  18. minetest.register_node("castle_farming:straw_dummy", {
  19. description = S("Training Dummy"),
  20. tiles = {"castle_straw_dummy.png"},
  21. groups = {choppy=4, flammable=1, oddly_breakable_by_hand=3},
  22. sounds = default.node_sound_leaves_defaults(),
  23. drawtype = "nodebox",
  24. paramtype = "light",
  25. paramtype2 = "facedir",
  26. node_box = {
  27. type = "fixed",
  28. fixed = {
  29. {-0.25, -0.5, -0.125, 0, 0.1875, 0.125}, -- right_leg
  30. {0, -0.5, -0.125, 0.25, 0.1875, 0.125}, -- left_leg
  31. {-0.25, 0.1875, -0.1875, 0.25, 0.875, 0.125}, -- torso
  32. {0.25, 0.1875, -0.125, 0.5, 0.875, 0.125}, -- left_arm
  33. {-0.5, 0.1875, -0.125, -0.25, 0.875, 0.125}, -- right_arm
  34. {-0.25, 0.875, -0.25, 0.25, 1.3125, 0.1875}, -- head
  35. }
  36. }
  37. })
  38. minetest.register_craft({
  39. output = "castle_farming:straw_dummy",
  40. recipe = {
  41. {"group:stick", "castle_farming:bound_straw","group:stick"},
  42. {"", "castle_farming:bound_straw",""},
  43. {"group:stick", "","group:stick"},
  44. },
  45. })
  46. minetest.register_craft({
  47. output = "castle_farming:bound_straw 6",
  48. type = "shapeless",
  49. recipe = {"farming:straw", "farming:straw", "farming:straw", "farming:straw", "farming:straw", "farming:straw", "ropes:ropesegment",}
  50. })
  51. minetest.register_craft({
  52. output = "castle_farming:bound_straw",
  53. type = "shapeless",
  54. recipe = {"farming:straw", "farming:cotton",}
  55. })
  56. minetest.register_craft({
  57. type = "fuel",
  58. recipe = "castle_farming:bound_straw",
  59. burntime = 10
  60. })
  61. local stick_burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack("default:stick")}}).time
  62. minetest.register_craft({
  63. type = "fuel",
  64. recipe = "castle_farming:straw_dummy",
  65. burntime = 10*2 + 4*stick_burn_time
  66. })