From 39e59b17731f1b07232be1c58e7d2dc862a5f9b4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 May 2014 18:09:30 -0400 Subject: [PATCH] init.lua --- init.lua | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 init.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..9afb52b --- /dev/null +++ b/init.lua @@ -0,0 +1,81 @@ +-- The bundle mod created by Golthem +-- WTFPL + +local use_boats = minetest.get_modpath("boats") + +-- Register the bundle item +minetest.register_craftitem("bundles:bundle", { + description = "Stick bundle", + inventory_image = "bundles_bundle.png" +}) + +if use_boats then +-- The paddle +-- Register the paddle item +minetest.register_craftitem("bundles:paddle", { + description = "Paddle", + inventory_image = "bundles_paddle.png" +}) +end + +-- Crafting! + +-- Register the crafting to bundle +minetest.register_craft({ + output = 'bundles:bundle', + recipe = { + {'', '', ''}, + {'default:stick', 'default:stick', 'default:stick'}, + {'', '', ''}, + } +}) + +-- Register the crafting back to sticks +minetest.register_craft({ + output = 'default:stick 3', + recipe = { + {'', '', ''}, + {'', 'bundles:bundle', ''}, + {'', '', ''}, + } +}) + +if use_boats then +-- Register the crafting to a paddle +minetest.register_craft({ + output = 'bundles:paddle', + recipe = { + {'', '', 'default:wood'}, + {'', 'default:stick', ''}, + {'default:stick', '', ''}, + } +}) + +-- Register boat crafting. IF it finds the boats mod. +minetest.register_craft({ + output = "boats:boat", + recipe = { + {'bundles:bundle','bundles:bundle','bundles:bundle'}, + {'bundles:bundle','bundles:bundle','bundles:bundle'}, + {'bundles:bundle','bundles:bundle','bundles:bundle'}, + }, +}) +end + +-- Fuel! + +-- Register the bundle fuel +minetest.register_craft({ + type = "fuel", + recipe = "bundles:bundle", + burntime = 15, +}) + +if use_boats then +-- You can burn your paddle but, why would you want to? +minetest.register_craft({ + type = "fuel", + recipe = "bundles:paddle", + burntime = 2, +}) +end \ No newline at end of file