battery.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. -- The battery item. Used to 'upgrade' battery array boxes so they can
  2. -- store energy consistent with the number of batteries stored in them.
  3. -- Also used as a craftitem in recipes.
  4. minetest.register_craftitem("battery:battery", {
  5. description = "RE Battery\n\nReduces the power requirements of a machine, if used as an upgrade.\nStores energy when wired into battery box housings.",
  6. inventory_image = "technic_battery.png",
  7. stack_max = 1, -- May store meta in the future. Used as upgrade item.
  8. })
  9. minetest.register_alias("battery:re_battery", "battery:battery")
  10. minetest.register_craft({
  11. output = 'battery:battery',
  12. recipe = {
  13. {'carbon_steel:dust', 'default:copper_ingot', 'zinc:dust'},
  14. {'lead:ingot', 'moreores:tin_ingot', 'lead:ingot'},
  15. {'zinc:dust', 'default:copper_ingot', 'carbon_steel:dust'},
  16. }
  17. })
  18. minetest.register_craftitem("battery:battery_broken", {
  19. description = "Broken RE Battery",
  20. inventory_image = "technic_battery_broken.png",
  21. stack_max = 1, -- May store meta in the future.
  22. })
  23. minetest.register_craft({
  24. output = 'battery:battery',
  25. recipe = {
  26. {'carbon_steel:dust'},
  27. {'battery:battery_broken'},
  28. {'zinc:dust'},
  29. }
  30. })