1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-06-28 12:56:01 +02:00

don't crash if placing bed on top of bed when not in auto-color mode.

This commit is contained in:
Vanessa Ezekowitz
2017-03-31 12:59:26 -04:00
parent b37e6ade7a
commit 5fb16c4e33

View File

@ -237,7 +237,7 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
local newparam2 = param2 % 8
if inv:contains_item("main", lastdye) then
minetest.set_node(toppos, { name = thisnode.name, param2 = param2})
inv:remove_item("main", lastdye.." 1")
if lastdye then inv:remove_item("main", lastdye.." 1") end
else
minetest.set_node(toppos, { name = thisnode.name, param2 = newparam2})
minetest.chat_send_player(placer_name, "Ran out of "..lastdye..", using neutral color.")