Crash for dropper failing as potentially cannot get pos.
parent
049406162e
commit
b72dbf17a6
|
@ -99,6 +99,7 @@ local dropperdef = {
|
|||
mesecons = {effector = {
|
||||
-- Drop random item when triggered
|
||||
action_on = function(pos, node)
|
||||
if not pos then return end
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local droppos
|
||||
|
|
|
@ -278,6 +278,10 @@ end
|
|||
|
||||
local old_add_item = minetest.add_item
|
||||
function minetest.add_item(pos, stack)
|
||||
if not pos then
|
||||
minetest.log("warning", "Trying to add item with missing pos: " .. tostring(stack))
|
||||
return
|
||||
end
|
||||
stack = ItemStack(stack)
|
||||
if get_item_group(stack:get_name(), "filled_map") > 0 then
|
||||
stack:set_name("mcl_maps:filled_map")
|
||||
|
|
Loading…
Reference in New Issue