From f12ef0b00de9de43a0cca69cffd80ca1a65fb08e Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 12 Feb 2023 15:53:17 -0700 Subject: [PATCH] fix exploding cairns --- collectible_lore/items.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/collectible_lore/items.lua b/collectible_lore/items.lua index 4a0c11b..19654e5 100644 --- a/collectible_lore/items.lua +++ b/collectible_lore/items.lua @@ -85,6 +85,12 @@ local cairn_loot = function(pos, player) return true 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", { description = S("Cairn"), _doc_items_longdesc = S("A cairn of rocks constructed by a previous explorer to protect documents and supplies."),