From d223b4f19c0e47e352cbbeb7c723b75e66c10b90 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Mon, 27 Feb 2017 17:03:30 -0500 Subject: update homedecor --- homedecor/handlers/inventory.lua | 6 +++--- homedecor/lighting.lua | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'homedecor') diff --git a/homedecor/handlers/inventory.lua b/homedecor/handlers/inventory.lua index 4db9892..62269e6 100644 --- a/homedecor/handlers/inventory.lua +++ b/homedecor/handlers/inventory.lua @@ -119,7 +119,7 @@ function homedecor.handle_inventory(name, def, original_def) local playername = player:get_player_name() if playername == owner or - minetest.check_player_privs(player, "protection_bypass") then + minetest.check_player_privs(playername, "protection_bypass") then return allow_move and allow_move(pos, from_list, from_index, to_list, to_index, count, player) or count @@ -138,7 +138,7 @@ function homedecor.handle_inventory(name, def, original_def) local playername = player:get_player_name() if playername == owner or - minetest.check_player_privs(player, "protection_bypass") then + minetest.check_player_privs(playername, "protection_bypass") then return allow_put and allow_put(pos, listname, index, stack, player) or stack:get_count() end @@ -156,7 +156,7 @@ function homedecor.handle_inventory(name, def, original_def) local playername = player:get_player_name() if playername == owner or - minetest.check_player_privs(player, "protection_bypass") then + minetest.check_player_privs(playername, "protection_bypass") then return allow_take and allow_take(pos, listname, index, stack, player) or stack:get_count() end diff --git a/homedecor/lighting.lua b/homedecor/lighting.lua index 4199558..776bc93 100644 --- a/homedecor/lighting.lua +++ b/homedecor/lighting.lua @@ -642,12 +642,13 @@ minetest.register_lbm({ param2 = paletteidx end + local meta = minetest.get_meta(pos) + if string.find(name, "table_lamp") or string.find(name, "standing_lamp") then meta:set_string("palette", "ext") end minetest.set_node(pos, { name = new_node, param2 = param2 }) - local meta = minetest.get_meta(pos) meta:set_string("dye", "unifieddyes:"..color) end }) -- cgit v1.2.3