fix exploding cairns

This commit is contained in:
FaceDeer 2023-02-12 15:53:17 -07:00
parent e186037f2b
commit f12ef0b00d

View File

@ -85,6 +85,12 @@ local cairn_loot = function(pos, player)
return true return true
end end
local function drop_item_stack(pos, stack)
if not stack or stack:is_empty() then return end
local drop_offset = vector.new(math.random() - 0.5, 0, math.random() - 0.5)
minetest.add_item(vector.add(pos, drop_offset), stack)
end
minetest.register_node("collectible_lore:cairn", { minetest.register_node("collectible_lore:cairn", {
description = S("Cairn"), description = S("Cairn"),
_doc_items_longdesc = S("A cairn of rocks constructed by a previous explorer to protect documents and supplies."), _doc_items_longdesc = S("A cairn of rocks constructed by a previous explorer to protect documents and supplies."),