Fixed duplication bug
This commit is contained in:
parent
b4080b6275
commit
f1c5f0ca1c
|
@ -210,14 +210,14 @@ minetest.register_on_joinplayer(function(player)
|
||||||
--The player might have items remaining in the slots from the previous join; this is likely
|
--The player might have items remaining in the slots from the previous join; this is likely
|
||||||
--when the server has been shutdown and the server didn't clean up the player inventories.
|
--when the server has been shutdown and the server didn't clean up the player inventories.
|
||||||
mcl_util.move_player_list(player, "stonecutter_input")
|
mcl_util.move_player_list(player, "stonecutter_input")
|
||||||
mcl_util.move_player_list(player, "stonecutter_output")
|
player:get_inventory():set_list("stonecutter_output", {})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player)
|
||||||
set_selected_item(player, nil)
|
set_selected_item(player, nil)
|
||||||
|
|
||||||
mcl_util.move_player_list(player, "stonecutter_input")
|
mcl_util.move_player_list(player, "stonecutter_input")
|
||||||
mcl_util.move_player_list(player, "stonecutter_output")
|
player:get_inventory():set_list("stonecutter_output", {})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
---Update content of the stonecutter output slot with the input slot and the selected item
|
---Update content of the stonecutter output slot with the input slot and the selected item
|
||||||
|
@ -259,7 +259,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
|
|
||||||
if fields.quit then
|
if fields.quit then
|
||||||
mcl_util.move_player_list(player, "stonecutter_input")
|
mcl_util.move_player_list(player, "stonecutter_input")
|
||||||
mcl_util.move_player_list(player, "stonecutter_output")
|
player:get_inventory():set_list("stonecutter_output", {})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue