mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-12 11:00:25 +01:00
remove armors drop, replaced by bones mod soon
fix crash in unified_inventory, on join if died, detached inventory is nil
This commit is contained in:
parent
06a1153d25
commit
2cb3a70846
@ -545,7 +545,7 @@ minetest.register_on_joinplayer(function(player)
|
||||
end, player)
|
||||
end
|
||||
end)
|
||||
|
||||
--[[
|
||||
if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
||||
armor.drop_armor = function(pos, stack)
|
||||
local obj = minetest.add_item(pos, stack)
|
||||
@ -602,6 +602,7 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
||||
end
|
||||
end)
|
||||
end
|
||||
--]]
|
||||
|
||||
minetest.register_on_player_hpchange(function(player, hp_change)
|
||||
local name, player_inv, armor_inv = armor:get_valid_player(player, "[on_hpchange]")
|
||||
|
@ -311,7 +311,11 @@ function unified_inventory.extract_bag(player, id)
|
||||
end
|
||||
|
||||
pinv:remove_item("bag" .. id, stack)
|
||||
minetest.get_inventory({type = "detached", name = minetest.formspec_escape(player:get_player_name()) .. "_bags"}):set_stack("bag" .. id, 1, nil)
|
||||
local dinv = minetest.get_inventory({type = "detached", name = minetest.formspec_escape(player:get_player_name()) .. "_bags"})
|
||||
if dinv then
|
||||
dinv:set_stack("bag" .. id, 1, nil)
|
||||
end
|
||||
|
||||
pinv:set_list("bag" .. id .. "contents", {})
|
||||
|
||||
stack:set_metadata(minetest.serialize(list))
|
||||
|
Loading…
Reference in New Issue
Block a user