generators.lua 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. --[[
  2. LV, MV, HV.
  3. different fuels for different outputs/etc.
  4. need nice craft sequences to make them.
  5. engine blocks, pistons, crankshafts, ecu, control panel
  6. need transmission
  7. gears for crafting
  8. generator section
  9. electric motor
  10. need enough air blocks nearby to work
  11. need motor sounds
  12. animated crankshafts
  13. ]]
  14. minetest.register_craftitem(":bitumen:engine_piston", {
  15. description = "Engine Piston",
  16. inventory_image = "bitumen_engine_piston.png",
  17. on_place_on_ground = minetest.craftitem_place_item,
  18. })
  19. minetest.register_craftitem(":bitumen:engine_crankshaft", {
  20. description = "Engine Piston",
  21. inventory_image = "bitumen_engine_crankshaft.png",
  22. on_place_on_ground = minetest.craftitem_place_item,
  23. })
  24. minetest.register_node("bitumen:gasoline_engine", {
  25. description = "Engine Piston",
  26. tiles = { "bitumen_gasoline_engine.png" },
  27. paramtype = "light",
  28. groups = {cracky=3},
  29. sounds = default.node_sound_leaves_defaults(),
  30. drawtype = "nodebox",
  31. node_box = {
  32. type = "fixed",
  33. fixed = {
  34. {-0.3, -0.5, -0.5, 0.3, 0.3, 0.5},
  35. {-0.5, -0.5, -0.3, 0.5, 0.3, 0.3},
  36. {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
  37. },
  38. },
  39. selection_box = {
  40. type = "fixed",
  41. fixed = {
  42. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  43. },
  44. },
  45. })
  46. minetest.register_node("bitumen:driveshaft", {
  47. description = "Driveshaft",
  48. tiles = { "bitumen_generator_lv.png" },
  49. paramtype = "light",
  50. groups = {cracky=3},
  51. sounds = default.node_sound_leaves_defaults(),
  52. drawtype = "nodebox",
  53. node_box = {
  54. type = "fixed",
  55. fixed = {
  56. {-0.3, -0.5, -0.5, 0.3, 0.3, 0.5},
  57. {-0.5, -0.5, -0.3, 0.5, 0.3, 0.3},
  58. {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
  59. },
  60. },
  61. selection_box = {
  62. type = "fixed",
  63. fixed = {
  64. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  65. },
  66. },
  67. })
  68. minetest.register_node("bitumen:electric_generator_lv", {
  69. description = "LV Electric Generator",
  70. tiles = { "bitumen_generator_lv.png" },
  71. paramtype = "light",
  72. groups = {cracky=3},
  73. sounds = default.node_sound_leaves_defaults(),
  74. drawtype = "nodebox",
  75. node_box = {
  76. type = "fixed",
  77. fixed = {
  78. {-0.3, -0.5, -0.5, 0.3, 0.3, 0.5},
  79. {-0.5, -0.5, -0.3, 0.5, 0.3, 0.3},
  80. {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
  81. },
  82. },
  83. selection_box = {
  84. type = "fixed",
  85. fixed = {
  86. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  87. },
  88. },
  89. })