Compare commits

..

3 Commits
1.5.5 ... 1.5.6

Author SHA1 Message Date
b0c9bcf3b9 Update screenshot 2022-02-21 01:02:57 +01:00
de70846d6c Smoother scrolling in skins category 2022-02-20 20:38:51 +01:00
8b6f50b387 Fix potential crash with skinssb 2022-02-20 18:57:52 +01:00
3 changed files with 8 additions and 7 deletions

View File

@ -53,4 +53,4 @@ Report bugs on the [**Bug Tracker**](https://github.com/minetest-mods/i3/issues)
**Video review on YouTube:** https://www.youtube.com/watch?v=Xd14BCdEZ3o **Video review on YouTube:** https://www.youtube.com/watch?v=Xd14BCdEZ3o
![Preview](https://user-images.githubusercontent.com/7883281/144105848-535b5e4f-a6fc-44d6-add1-e62a45d36f63.png) ![Preview](https://content.minetest.net/uploads/3abf3755de.png)

View File

@ -5,7 +5,7 @@ local init_detached = i3.files.detached()
local init_hud = i3.files.hud() local init_hud = i3.files.hud()
local set_fs = i3.set_fs local set_fs = i3.set_fs
IMPORT("slz", "min", "copy", "ItemStack") IMPORT("slz", "min", "insert", "copy", "ItemStack")
IMPORT("spawn_item", "reset_data", "get_detached_inv") IMPORT("spawn_item", "reset_data", "get_detached_inv")
core.register_on_player_hpchange(function(player, hpchange) core.register_on_player_hpchange(function(player, hpchange)
@ -175,7 +175,7 @@ local function save_data(player_name)
storage:set_string("data", slz(_data)) storage:set_string("data", slz(_data))
end end
core.register_on_joinplayer(function(player) insert(core.registered_on_joinplayers, 1, function(player)
local name = player:get_player_name() local name = player:get_player_name()
local info = core.get_player_information and core.get_player_information(name) local info = core.get_player_information and core.get_player_information(name)

View File

@ -14,6 +14,11 @@ local function inv_fields(player, data, fields)
local inv = player:get_inventory() local inv = player:get_inventory()
local sb_inv = fields.scrbar_inv 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.skins then if fields.skins then
local id = tonumber(fields.skins) local id = tonumber(fields.skins)
local _skins = skins.get_skinlist_for_player(name) local _skins = skins.get_skinlist_for_player(name)
@ -169,10 +174,6 @@ local function inv_fields(player, data, fields)
data.bag = bagstack:to_string() data.bag = bagstack:to_string()
data.bag_rename = nil data.bag_rename = nil
elseif sb_inv and sub(sb_inv, 1, 3) == "CHG" then
data.scrbar_inv = tonumber(match(sb_inv, "%d+"))
return
elseif fields.waypoint_add then elseif fields.waypoint_add then
local max_waypoints = i3.settings.max_waypoints local max_waypoints = i3.settings.max_waypoints