mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 12:33:43 +01:00
Remove demo custom recipe
This commit is contained in:
parent
1ba1e41dcd
commit
3f44ae00d2
@ -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({
|
||||
|
16
init.lua
16
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user