mirror of
https://github.com/minetest-mods/i3.git
synced 2025-07-03 09:00:23 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
b0c9bcf3b9 | |||
de70846d6c | |||
8b6f50b387 |
@ -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
|
||||
|
||||

|
||||

|
||||
|
@ -5,7 +5,7 @@ local init_detached = i3.files.detached()
|
||||
local init_hud = i3.files.hud()
|
||||
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")
|
||||
|
||||
core.register_on_player_hpchange(function(player, hpchange)
|
||||
@ -175,7 +175,7 @@ local function save_data(player_name)
|
||||
storage:set_string("data", slz(_data))
|
||||
end
|
||||
|
||||
core.register_on_joinplayer(function(player)
|
||||
insert(core.registered_on_joinplayers, 1, function(player)
|
||||
local name = player:get_player_name()
|
||||
local info = core.get_player_information and core.get_player_information(name)
|
||||
|
||||
|
@ -14,6 +14,11 @@ local function inv_fields(player, data, fields)
|
||||
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.skins then
|
||||
local id = tonumber(fields.skins)
|
||||
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_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
|
||||
local max_waypoints = i3.settings.max_waypoints
|
||||
|
||||
|
Reference in New Issue
Block a user