Remove demo custom recipe

This commit is contained in:
Jean-Patrick Guerrero 2019-02-11 01:03:48 +01:00
parent 1ba1e41dcd
commit 3f44ae00d2
2 changed files with 3 additions and 17 deletions

View File

@ -22,7 +22,7 @@ Use the command `/craft` to show the recipe(s) of the pointed node.
### Custom recipes ### Custom recipes
#### Registering a custom crafting type #### Registering a custom crafting type (example)
```Lua ```Lua
craftguide.register_craft_type("digging", { 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 ```Lua
craftguide.register_craft({ craftguide.register_craft({

View File

@ -89,11 +89,6 @@ function craftguide.register_craft_type(name, def)
end end
end end
craftguide.register_craft_type("digging", {
description = S("Digging"),
icon = "default_tool_steelpick.png",
})
function craftguide.register_craft(def) function craftguide.register_craft(def)
local func = "craftguide." .. __func() .. "(): " local func = "craftguide." .. __func() .. "(): "
assert(def.type, func .. "'type' field missing") assert(def.type, func .. "'type' field missing")
@ -104,13 +99,6 @@ function craftguide.register_craft(def)
craftguide.custom_crafts[#craftguide.custom_crafts + 1] = def craftguide.custom_crafts[#craftguide.custom_crafts + 1] = def
end end
craftguide.register_craft({
type = "digging",
width = 1,
output = "default:cobble",
items = {"default:stone"},
})
local recipe_filters = {} local recipe_filters = {}
function craftguide.add_recipe_filter(name, func) 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 local no_recipes = not recipes or #recipes == 0
if no_recipes and not is_fuel then if no_recipes and not is_fuel then
return return
end elseif is_fuel and no_recipes then
if is_fuel and no_recipes then
data.show_usages = true data.show_usages = true
end end