diff --git a/technic/spec/hv_network_spec.lua b/technic/spec/hv_network_spec.lua index f4ceb7f7..2c3b2a2e 100644 --- a/technic/spec/hv_network_spec.lua +++ b/technic/spec/hv_network_spec.lua @@ -52,7 +52,7 @@ describe("HV machine network", function() local meta = minetest.get_meta(pos) local inv = meta:get_inventory() if not inv:room_for_item(listname or "src", itemstack) then - inv:set_stack(listname or "src", 1, ItemStack()) + inv:set_stack(listname or "src", 1, ItemStack(nil)) end inv:add_item(listname or "src", itemstack) end diff --git a/technic/spec/lv_network_spec.lua b/technic/spec/lv_network_spec.lua index fbe74b5d..219801ab 100644 --- a/technic/spec/lv_network_spec.lua +++ b/technic/spec/lv_network_spec.lua @@ -78,7 +78,7 @@ describe("LV machine network", function() local meta = minetest.get_meta(pos) local inv = meta:get_inventory() if not inv:room_for_item(listname or "src", itemstack) then - inv:set_stack(listname or "src", 1, ItemStack()) + inv:set_stack(listname or "src", 1, ItemStack(nil)) end inv:add_item(listname or "src", itemstack) end diff --git a/technic/spec/tools_compatibility_spec.lua b/technic/spec/tools_compatibility_spec.lua index 07bc4bfb..10f2b6b6 100644 --- a/technic/spec/tools_compatibility_spec.lua +++ b/technic/spec/tools_compatibility_spec.lua @@ -59,8 +59,8 @@ describe("Technic power tool compatibility", function() end) before_each(function() - set_charge_stack(ItemStack()) - set_discharge_stack(ItemStack()) + set_charge_stack(ItemStack(nil)) + set_discharge_stack(ItemStack(nil)) end) it("is registered", function() diff --git a/technic/spec/tools_spec.lua b/technic/spec/tools_spec.lua index 7bcd6370..dbeb89a3 100644 --- a/technic/spec/tools_spec.lua +++ b/technic/spec/tools_spec.lua @@ -56,8 +56,8 @@ describe("Technic power tool", function() describe("API", function() setup(function() - set_charge_stack(ItemStack()) - set_discharge_stack(ItemStack()) + set_charge_stack(ItemStack(nil)) + set_discharge_stack(ItemStack(nil)) mineunit:set_current_modname("mymod") mineunit:execute_on_joinplayer(player) end) @@ -149,8 +149,8 @@ describe("Technic power tool", function() end setup(function() - set_charge_stack(ItemStack()) - set_discharge_stack(ItemStack()) + set_charge_stack(ItemStack(nil)) + set_discharge_stack(ItemStack(nil)) mineunit:set_current_modname("mymod") register_test_tool("t1_1", 1, 1) register_test_tool("t1_2", 1, 2) @@ -263,8 +263,8 @@ describe("Technic power tool", function() local itemdef = minetest.registered_items[itemname] setup(function() - set_charge_stack(ItemStack()) - set_discharge_stack(ItemStack()) + set_charge_stack(ItemStack(nil)) + set_discharge_stack(ItemStack(nil)) mineunit:execute_on_joinplayer(player) end) @@ -308,8 +308,8 @@ describe("Technic power tool", function() local itemdef = minetest.registered_items[itemname] setup(function() - set_charge_stack(ItemStack()) - set_discharge_stack(ItemStack()) + set_charge_stack(ItemStack(nil)) + set_discharge_stack(ItemStack(nil)) mineunit:execute_on_joinplayer(player) player:get_inventory():set_stack("main", 1, itemname) end) @@ -401,8 +401,8 @@ describe("Technic power tool", function() -- Some wood for chainsaw {{{x=-10,y=0,z=-10},{x=10,y=10,z=10}}, "default:wood"}, }) - set_charge_stack(ItemStack()) - set_discharge_stack(ItemStack()) + set_charge_stack(ItemStack(nil)) + set_discharge_stack(ItemStack(nil)) mineunit:execute_on_joinplayer(player) set_player_stack(itemname) end) diff --git a/technic_cnc/spec/api_spec.lua b/technic_cnc/spec/api_spec.lua index c99f70c9..7b78f2a8 100644 --- a/technic_cnc/spec/api_spec.lua +++ b/technic_cnc/spec/api_spec.lua @@ -64,7 +64,7 @@ describe("CNC API", function() local meta = minetest.get_meta(pos) local inventory = meta:get_inventory() inventory:set_stack("src", 1, "default:stone 42") - inventory:set_stack("dst", 1, ItemStack()) + inventory:set_stack("dst", 1, ItemStack(nil)) local materialstack = inventory:get_stack("src", 1) -- Test CNC cutting process @@ -82,7 +82,7 @@ describe("CNC API", function() local meta = minetest.get_meta(pos) local inventory = meta:get_inventory() inventory:set_stack("src", 1, "default:badstone 42") - inventory:set_stack("dst", 1, ItemStack()) + inventory:set_stack("dst", 1, ItemStack(nil)) local materialstack = inventory:get_stack("src", 1) -- Test CNC cutting process diff --git a/technic_cnc/spec/technic_cnc_spec.lua b/technic_cnc/spec/technic_cnc_spec.lua index ef876cd9..a580415d 100644 --- a/technic_cnc/spec/technic_cnc_spec.lua +++ b/technic_cnc/spec/technic_cnc_spec.lua @@ -32,7 +32,7 @@ describe("Technic CNC", function() local meta = minetest.get_meta(pos) local inv = meta:get_inventory() if not inv:room_for_item(listname or "src", itemstack) then - inv:set_stack(listname or "src", 1, ItemStack()) + inv:set_stack(listname or "src", 1, ItemStack(nil)) end inv:add_item(listname or "src", itemstack) end @@ -48,7 +48,7 @@ describe("Technic CNC", function() local meta = minetest.get_meta(pos) local inv = meta:get_inventory() for index=1, inv:get_size(listname or "dst") do - inv:set_stack(listname or "dst", index, ItemStack()) + inv:set_stack(listname or "dst", index, ItemStack(nil)) end end