Giuseppe Bilotta 44a537e705 Fix placement of eggcorns on top of shelves
Right-clicking on the top of a shelf would place a legacy plantlike
eggcorn. This was due to the storebox right-click override
unconditionally calling `item_place_node` when placing an item against an
inaccessible side of a storebox.

The solution would be to call `item_place` instead, since that function
has the logic to handle `place_as_item` correctly. However, this cannot
be called from the storebox right-click override directly because
`item_place` calls the `pointed_thing` `on_rightclick`, which would
cause an infinite recursion.

Solve this by refactoring the placement logic into a new
`minetest.item_place_node_or_stack` which is called by `item_place`,
as well as by the storebox right-click override when placing items.
2022-03-25 19:15:02 +01:00
..
2021-03-09 08:25:01 -05:00