From 3f44ae00d20b7056718ee840ef76b62487bd5724 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Mon, 11 Feb 2019 01:03:48 +0100 Subject: [PATCH] Remove demo custom recipe --- README.md | 4 ++-- init.lua | 16 +--------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index b093611..7dbbec5 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Use the command `/craft` to show the recipe(s) of the pointed node. ### Custom recipes -#### Registering a custom crafting type +#### Registering a custom crafting type (example) ```Lua craftguide.register_craft_type("digging", { @@ -31,7 +31,7 @@ craftguide.register_craft_type("digging", { }) ``` -#### Registering a custom crafting recipe +#### Registering a custom crafting recipe (example) ```Lua craftguide.register_craft({ diff --git a/init.lua b/init.lua index 3000398..26c0c5e 100644 --- a/init.lua +++ b/init.lua @@ -89,11 +89,6 @@ function craftguide.register_craft_type(name, def) end end -craftguide.register_craft_type("digging", { - description = S("Digging"), - icon = "default_tool_steelpick.png", -}) - function craftguide.register_craft(def) local func = "craftguide." .. __func() .. "(): " assert(def.type, func .. "'type' field missing") @@ -104,13 +99,6 @@ function craftguide.register_craft(def) craftguide.custom_crafts[#craftguide.custom_crafts + 1] = def end -craftguide.register_craft({ - type = "digging", - width = 1, - output = "default:cobble", - items = {"default:stone"}, -}) - local recipe_filters = {} function craftguide.add_recipe_filter(name, func) @@ -238,9 +226,7 @@ local function get_recipes(item, data, player) local no_recipes = not recipes or #recipes == 0 if no_recipes and not is_fuel then return - end - - if is_fuel and no_recipes then + elseif is_fuel and no_recipes then data.show_usages = true end