mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 04:23:44 +01:00
Minor cleaning
This commit is contained in:
parent
4fb4fe1763
commit
ee1eac039e
11
API.md
11
API.md
@ -65,15 +65,6 @@ craftguide.register_craft({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
result = "default:mese 2",
|
|
||||||
items = {
|
|
||||||
"default:mese_crystal, default:mese_crystal",
|
|
||||||
"default:mese_crystal, default:mese_crystal",
|
|
||||||
"default:mese_crystal, default:mese_crystal",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
big = {
|
big = {
|
||||||
result = "default:mese 4",
|
result = "default:mese 4",
|
||||||
items = {
|
items = {
|
||||||
@ -90,7 +81,7 @@ Recipes can be registered via an URL (HTTP support is required¹):
|
|||||||
|
|
||||||
```Lua
|
```Lua
|
||||||
craftguide.register_craft({
|
craftguide.register_craft({
|
||||||
url = https://raw.githubusercontent.com/minetest-mods/craftguide/master/test.json
|
url = "https://raw.githubusercontent.com/minetest-mods/craftguide/master/test.json"
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
5
init.lua
5
init.lua
@ -740,7 +740,6 @@ local function get_output_fs(fs, L)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function get_grid_fs(fs, rcp, spacing)
|
local function get_grid_fs(fs, rcp, spacing)
|
||||||
if not rcp then return end
|
|
||||||
local width = rcp.width or 1
|
local width = rcp.width or 1
|
||||||
local replacements = rcp.replacements
|
local replacements = rcp.replacements
|
||||||
local rarity = rcp.rarity
|
local rarity = rcp.rarity
|
||||||
@ -913,7 +912,9 @@ local function get_panels(data, fs)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local rcp = k == "recipes" and v[data.rnum] or v[data.unum]
|
local rcp = k == "recipes" and v[data.rnum] or v[data.unum]
|
||||||
get_grid_fs(fs, rcp, spacing)
|
if rcp then
|
||||||
|
get_grid_fs(fs, rcp, spacing)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user