From b69f7d33e40bff485bae137cc061309542456ed8 Mon Sep 17 00:00:00 2001 From: crabman77 Date: Thu, 7 Apr 2016 18:17:14 +0200 Subject: [PATCH] remove bed spawn on dig homedecor:bed --- mods/homedecor_modpack/homedecor/bedroom.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mods/homedecor_modpack/homedecor/bedroom.lua b/mods/homedecor_modpack/homedecor/bedroom.lua index 683e53aa..c5405214 100755 --- a/mods/homedecor_modpack/homedecor/bedroom.lua +++ b/mods/homedecor_modpack/homedecor/bedroom.lua @@ -76,8 +76,14 @@ for i in ipairs(bedcolors) do return homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, color) end end, - after_dig_node = function(pos) + after_dig_node = function(pos, oldnode, oldmetadata, digger) homedecor.unextend_bed(pos, color) + if minetest.get_modpath("beds") then -- MFF (crabman 7/04/2016) remove bed spawn on dig + local name = digger:get_player_name() + if not name or name == "" then return end + beds.spawn[name] = nil + beds.save_spawns() + end end, on_rightclick = function(pos, node, clicker) if minetest.get_modpath("beds") then