From c87a179cb50a4b4d9495ba7aa7e5fdb00c788643 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Fri, 6 Aug 2021 02:56:36 +0200 Subject: [PATCH] Minor cleaning --- init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index a6b77f9..623182e 100644 --- a/init.lua +++ b/init.lua @@ -2745,8 +2745,6 @@ if rawget(_G, "awards") then local player = core.get_player_by_name(name) set_fs(player) end) - - core.register_on_dieplayer(set_fs) end core.register_on_chatcommand(function(name) @@ -3022,11 +3020,13 @@ core.register_on_dieplayer(function(player) local data = pdata[name] if not data then return end - data.bag_size = nil - data.bag:set_list("main", {}) + if data.bag_size then + data.bag_size = nil + data.bag:set_list("main", {}) - local inv = player:get_inventory() - inv:set_size("main", INV_SIZE) + local inv = player:get_inventory() + inv:set_size("main", INV_SIZE) + end set_fs(player) end)