mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-26 09:59:33 +01:00
Crash for dropper failing as potentially cannot get pos.
This commit is contained in:
parent
049406162e
commit
b72dbf17a6
2 changed files with 5 additions and 0 deletions
|
@ -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 a new issue