From 95403b81b087d9666a4d914ba889f8c04af6ef56 Mon Sep 17 00:00:00 2001 From: Hume2 Date: Thu, 30 Aug 2018 09:10:13 +0200 Subject: Add a recipe for bike --- init.lua | 49 +++++++++++++++++++++++++++++++++++++--------- textures/bike_handles.png | Bin 0 -> 241 bytes textures/bike_wheel.png | Bin 0 -> 643 bytes 3 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 textures/bike_handles.png create mode 100644 textures/bike_wheel.png diff --git a/init.lua b/init.lua index 9df4680..90a9a2b 100644 --- a/init.lua +++ b/init.lua @@ -246,18 +246,49 @@ minetest.register_craftitem("bike:bike", { end, }) +minetest.register_craftitem("bike:wheel", { + description = "Bike Wheel", + inventory_image = "bike_wheel.png", +}) ---[[minetest.register_craft({ - output = "bike:bike", +minetest.register_craftitem("bike:handles", { + description = "Bike Handles", + inventory_image = "bike_handles.png", +}) + +if minetest.get_modpath("technic") ~= nil then + minetest.register_craft({ + output = "bike:wheel 2", + recipe = { + {"", "technic:rubber", ""}, + {"technic:rubber", "default:steel_ingot", "technic:rubber"}, + {"", "technic:rubber", ""}, + }, + }) +else + minetest.register_craft({ + output = "bike:wheel 2", + recipe = { + {"", "group:wood", ""}, + {"group:wood", "default:steel_ingot", "group:wood"}, + {"", "group:wood", ""}, + }, + }) +end + +minetest.register_craft({ + output = "bike:handles", recipe = { - {"", "", "" }, - {"group:wood", "", "group:wood"}, - {"group:wood", "group:wood", "group:wood"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"group:wood", "", "group:wood"}, }, }) minetest.register_craft({ - type = "fuel", - recipe = "bike:bike", - burntime = 20, -})--]] + output = "bike:bike", + recipe = { + {"bike:handles", "", "group:wood"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"bike:wheel", "", "bike:wheel"}, + }, +}) diff --git a/textures/bike_handles.png b/textures/bike_handles.png new file mode 100644 index 0000000..4115c95 Binary files /dev/null and b/textures/bike_handles.png differ diff --git a/textures/bike_wheel.png b/textures/bike_wheel.png new file mode 100644 index 0000000..90eeef0 Binary files /dev/null and b/textures/bike_wheel.png differ -- cgit v1.2.3