To reproduce:
Fill main inventory and quickbar with items. Pick one stack from the quickbar onto your cursor and run:
Code: Select all
/c local p = game.local_player; p.print(serpent.line(p.can_insert{name="iron-plate", count=1}));p.print(serpent.line(p.insert{name="iron-plate", count=1}))
Code: Select all
true
Cannot insert Iron Plate. Player's inventory full.
0
Using the inventory directly is consistent:
Code: Select all
/c local p, item = game.local_player, "medium-electric-pole"
local main, quick = p.get_inventory(1), p.get_inventory(2)
p.print("quick:"..serpent.line(quick.can_insert{name=item, count=1}))
p.print("insert quick:"..serpent.line(quick.insert{name=item, count=1}))