don't assume all locked multinodes to be refrigerators

This commit is contained in:
Tim 2015-01-22 22:54:08 +01:00 committed by Vanessa Ezekowitz
parent cdbdcbef14
commit 9912f72de6
3 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ local function stack(itemstack, placer, fdir, pos, def, pos2, node1, node2)
if string.find(nodename, "_locked") then
local meta = minetest.get_meta(pos)
meta:set_string("owner", placer_name)
meta:set_string("infotext", S("Locked Refrigerator (owned by %s)"):format(placer_name))
meta:set_string("infotext", S("Locked %s (owned by %s)"):format(minetest.registered_nodes[nodename].infotext, placer_name))
end
if not homedecor.expect_infinite_stacks then

View File

@ -54,7 +54,7 @@ homedecor.register("refrigerator_steel_bottom", {
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
},
on_place = function(itemstack, placer, pointed_thing)
homedecor.stack_vertically(itemstack, placer, pointed_thing, "homedecor:refrigerator_steel_bottom", "homedecor:refrigerator_steel_top")
homedecor.stack_vertically(itemstack, placer, pointed_thing, itemstack:get_name(), "homedecor:refrigerator_steel_top")
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }
@ -109,7 +109,7 @@ homedecor.register("refrigerator_white_bottom", {
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
},
on_place = function(itemstack, placer, pointed_thing)
homedecor.stack_vertically(itemstack, placer, pointed_thing, "homedecor:refrigerator_white_bottom", "homedecor:refrigerator_white_top")
homedecor.stack_vertically(itemstack, placer, pointed_thing, itemstack:get_name(), "homedecor:refrigerator_white_top")
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z }

View File

@ -26,7 +26,7 @@ function homedecor.register(name, def)
or (def.node_box and "nodebox")
local infotext = def.infotext
def.infotext = nil -- no need to register this into the global node table
--def.infotext = nil -- currently used to set locked refrigerator infotexts
-- handle inventory setting
-- inventory = {