mirror of
https://github.com/minetest-mods/i3.git
synced 2025-07-04 17:40:23 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
7246249c52 | |||
d36d6e67e7 |
2
init.lua
2
init.lua
@ -20,7 +20,7 @@ local function lf(path)
|
|||||||
end
|
end
|
||||||
|
|
||||||
i3 = {
|
i3 = {
|
||||||
version = 1152,
|
version = 1153,
|
||||||
data = core.deserialize(storage:get_string"data") or {},
|
data = core.deserialize(storage:get_string"data") or {},
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -12,12 +12,6 @@ IMPORT("search", "sort_inventory", "sort_by_category", "get_recipes", "get_detac
|
|||||||
local function inv_fields(player, data, fields)
|
local function inv_fields(player, data, fields)
|
||||||
local name = data.player_name
|
local name = data.player_name
|
||||||
local inv = player:get_inventory()
|
local inv = player:get_inventory()
|
||||||
local sb_inv = fields.scrbar_inv
|
|
||||||
|
|
||||||
if sb_inv and sub(sb_inv, 1, 3) == "CHG" then
|
|
||||||
data.scrbar_inv = tonumber(match(sb_inv, "%d+"))
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if fields.dd_sorting_method then
|
if fields.dd_sorting_method then
|
||||||
data.sort = tonumber(fields.dd_sorting_method)
|
data.sort = tonumber(fields.dd_sorting_method)
|
||||||
@ -446,6 +440,12 @@ core.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
local data = i3.data[name]
|
local data = i3.data[name]
|
||||||
if not data then return end
|
if not data then return end
|
||||||
|
|
||||||
|
local sb_inv = fields.scrbar_inv
|
||||||
|
if sb_inv and sub(sb_inv, 1, 3) == "CHG" then
|
||||||
|
data.scrbar_inv = tonumber(match(sb_inv, "%d+"))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
for f in pairs(fields) do
|
for f in pairs(fields) do
|
||||||
if sub(f, 1, 4) == "tab_" then
|
if sub(f, 1, 4) == "tab_" then
|
||||||
local tabname = sub(f, 5)
|
local tabname = sub(f, 5)
|
||||||
|
Reference in New Issue
Block a user