inventory preconditions work again

This commit is contained in:
Sokomine 2022-09-27 23:48:11 +02:00
parent 9ffabc17ce
commit 11e555e639

View File

@ -253,6 +253,13 @@ yl_speak_up.save_element_p_or_a_or_e = function(
v[ id_prefix.."itemstack" ] = data.inv_stack_name
end
if(data and data.what_type == "player_inv") then
data.inv_list_name = "main"
elseif(data and data.what_type == "npc_inv") then
data.inv_list_name = "npc_main"
elseif(data and data.what_type == "block_inv") then
data.inv_list_name = "main"
end
if(not(data.inv_list_name) or data.inv_list_name == "") then
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:"..formspec_input_to,