This commit is contained in:
Jean-Patrick Guerrero 2020-04-07 18:03:53 +02:00
parent 4483f60cbc
commit 8c7408f66f
1 changed files with 19 additions and 21 deletions

View File

@ -52,16 +52,16 @@ local ES = function(...)
return ESC(S(...))
end
local maxn, sort, concat, copy, insert, remove, unpack =
local maxn, sort, concat, copy, insert, remove =
table.maxn, table.sort, table.concat, table.copy,
table.insert, table.remove, unpack
table.insert, table.remove
local fmt, find, gmatch, match, sub, split, upper, lower =
string.format, string.find, string.gmatch, string.match,
string.sub, string.split, string.upper, string.lower
local min, max, floor, ceil = math.min, math.max, math.floor, math.ceil
local pairs, next, type, tostring, io = pairs, next, type, tostring, io
local pairs, next, type, tostring, unpack, io = pairs, next, type, tostring, unpack, io
local vec_add, vec_mul = vector.add, vector.multiply
local FORMSPEC_MINIMAL_VERSION = 3
@ -301,8 +301,9 @@ function craftguide.register_craft(def)
if true_str(def.url) then
if not http then
return err"No HTTP support for this mod. " ..
"Add it to the `secure.http_mods` or `secure.trusted_mods` setting."
return err "craftguide.register_craft(): Unable to reach " ..
def.url .. ". No HTTP support for this mod: " ..
"add it to the `secure.http_mods` or `secure.trusted_mods` setting."
end
http.fetch({url = def.url}, function(result)
@ -473,6 +474,7 @@ end
local function item_in_recipe(item, recipe)
local clean_item = reg_aliases[item] or item
for _, recipe_item in pairs(recipe.items) do
local clean_recipe_item = reg_aliases[recipe_item] or recipe_item
if clean_recipe_item == clean_item then
@ -1825,11 +1827,7 @@ if progressive_mode then
return filtered
end
local item_lists = {
"main",
"craft",
"craftpreview",
}
local item_lists = {"main", "craft", "craftpreview"}
local function get_inv_items(player)
local inv = player:get_inventory()