mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-23 03:13:44 +01:00
get_formspec -> make_formspec
This commit is contained in:
parent
50317cc20e
commit
157c6e5004
10
init.lua
10
init.lua
@ -344,7 +344,7 @@ local function get_recipe_fs(iX, iY, xoffset, recipe_num, recipes, show_usage)
|
|||||||
return concat(fs)
|
return concat(fs)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_formspec(player_name)
|
local function make_formspec(player_name)
|
||||||
local data = player_data[player_name]
|
local data = player_data[player_name]
|
||||||
local iY = sfinv_only and 4 or data.iX - 5
|
local iY = sfinv_only and 4 or data.iX - 5
|
||||||
local ipp = data.iX * iY
|
local ipp = data.iX * iY
|
||||||
@ -435,7 +435,7 @@ local show_fs = function(player, player_name)
|
|||||||
local context = sfinv.get_or_create_context(player)
|
local context = sfinv.get_or_create_context(player)
|
||||||
sfinv.set_player_inventory_formspec(player, context)
|
sfinv.set_player_inventory_formspec(player, context)
|
||||||
else
|
else
|
||||||
get_formspec(player_name)
|
make_formspec(player_name)
|
||||||
local data = player_data[player_name]
|
local data = player_data[player_name]
|
||||||
show_formspec(player_name, "craftguide", data.formspec)
|
show_formspec(player_name, "craftguide", data.formspec)
|
||||||
end
|
end
|
||||||
@ -747,7 +747,7 @@ if sfinv_only then
|
|||||||
return sfinv.make_formspec(
|
return sfinv.make_formspec(
|
||||||
player,
|
player,
|
||||||
context,
|
context,
|
||||||
get_formspec(player_name)
|
make_formspec(player_name)
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
@ -776,12 +776,12 @@ else
|
|||||||
|
|
||||||
if not data then
|
if not data then
|
||||||
init_data(user, player_name)
|
init_data(user, player_name)
|
||||||
get_formspec(player_name)
|
make_formspec(player_name)
|
||||||
data = player_data[player_name]
|
data = player_data[player_name]
|
||||||
elseif progressive_mode then
|
elseif progressive_mode then
|
||||||
data.progressive_items = get_progressive_items(user)
|
data.progressive_items = get_progressive_items(user)
|
||||||
filter_items(data)
|
filter_items(data)
|
||||||
get_formspec(player_name)
|
make_formspec(player_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
show_formspec(player_name, "craftguide", data.formspec)
|
show_formspec(player_name, "craftguide", data.formspec)
|
||||||
|
Loading…
Reference in New Issue
Block a user