mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-23 00:20:17 +01:00
allow shift-dig a king size bed to get the two twin beds back
This commit is contained in:
parent
cc804c734d
commit
12cc9da08c
@ -264,6 +264,13 @@ for _, color in ipairs(bedcolors) do
|
||||
groups = {snappy=3, not_in_creative_inventory=1},
|
||||
selection_box = kbed_cbox,
|
||||
collision_box = kbed_cbox,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local inv = digger:get_inventory()
|
||||
if digger:get_player_control().sneak and inv:room_for_item("main", "bed_"..color.."_regular 1") then
|
||||
inv:remove_item("main", "homedecor:bed_"..color.."_kingsize 1")
|
||||
inv:add_item("main", "homedecor:bed_"..color.."_regular 2")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:bed_"..color.."_foot", "homedecor:bed_"..color.."_regular")
|
||||
|
Loading…
Reference in New Issue
Block a user