mirror of
https://github.com/minetest-mods/i3.git
synced 2024-11-15 23:30:22 +01:00
Cleanup progressive
This commit is contained in:
parent
36e186c899
commit
c3472a3580
15
init.lua
15
init.lua
|
@ -1983,7 +1983,7 @@ local function make_fs(player, data)
|
||||||
get_item_list(fs, data, full_height)
|
get_item_list(fs, data, full_height)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not is_creative and data.query_item then
|
if data.query_item then
|
||||||
get_panels(player, fs, data)
|
get_panels(player, fs, data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2294,13 +2294,6 @@ local function init_data(player, name)
|
||||||
|
|
||||||
if data.fs_version < MIN_FORMSPEC_VERSION then return end
|
if data.fs_version < MIN_FORMSPEC_VERSION then return end
|
||||||
|
|
||||||
if progressive_mode then
|
|
||||||
data.inv_items = {}
|
|
||||||
local items = get_filtered_items(player, data)
|
|
||||||
data.items_raw = items
|
|
||||||
search(data)
|
|
||||||
end
|
|
||||||
|
|
||||||
after(0, set_fs, player)
|
after(0, set_fs, player)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2676,12 +2669,16 @@ if progressive_mode then
|
||||||
|
|
||||||
on_joinplayer(function(player)
|
on_joinplayer(function(player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local data = pdata[name]
|
|
||||||
local meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
|
local data = pdata[name]
|
||||||
|
|
||||||
data.inv_items = dslz(meta:get_string "inv_items") or {}
|
data.inv_items = dslz(meta:get_string "inv_items") or {}
|
||||||
data.known_recipes = dslz(meta:get_string "known_recipes") or 0
|
data.known_recipes = dslz(meta:get_string "known_recipes") or 0
|
||||||
|
|
||||||
|
local items = get_filtered_items(player, data)
|
||||||
|
data.items_raw = items
|
||||||
|
search(data)
|
||||||
|
|
||||||
if singleplayer then
|
if singleplayer then
|
||||||
init_hud(player, data)
|
init_hud(player, data)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user