mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 11:53:46 +01:00
Crash for dropper failing as potentially cannot get pos.
This commit is contained in:
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
Block a user