mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 18:20:36 +01:00
fix global var
This commit is contained in:
parent
b78e2a74bb
commit
e9b525b48a
@ -323,7 +323,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
local craft_index = ((y - 1) * 3) + x
|
local craft_index = ((y - 1) * 3) + x
|
||||||
local craft_item = craft_list[craft_index]
|
local craft_item = craft_list[craft_index]
|
||||||
if (not craft_item) or (craft_item:is_empty()) or (craft_item:get_name() == needed_item) then
|
if (not craft_item) or (craft_item:is_empty()) or (craft_item:get_name() == needed_item) then
|
||||||
itemname = craft_item and craft_item:get_name() or needed_item
|
local itemname = craft_item and craft_item:get_name() or needed_item
|
||||||
local needed_stack = ItemStack(needed_item)
|
local needed_stack = ItemStack(needed_item)
|
||||||
if player_inv:contains_item("main", needed_stack) then
|
if player_inv:contains_item("main", needed_stack) then
|
||||||
local count = (craft_item and craft_item:get_count() or 0) + 1
|
local count = (craft_item and craft_item:get_count() or 0) + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user