From b5433d8c39eb59326842ab9e231dffc9f54571ca Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 10 May 2015 22:30:53 -0400 Subject: [PATCH] don't use string.find() where == will do. --- homedecor/bathroom_sanitation.lua | 8 ++++---- homedecor/kitchen_furniture.lua | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homedecor/bathroom_sanitation.lua b/homedecor/bathroom_sanitation.lua index 79bd80c0..8c934b9b 100644 --- a/homedecor/bathroom_sanitation.lua +++ b/homedecor/bathroom_sanitation.lua @@ -117,9 +117,9 @@ homedecor.register("sink", { local function taps_on_rightclick(pos, node, clicker) local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z}) if below and - string.find(below.name, "homedecor:shower_tray") or - string.find(below.name, "homedecor:sink") or - string.find(below.name, "homedecor:kitchen_cabinet_with_sink") then + below.name == "homedecor:shower_tray" or + below.name == "homedecor:sink" or + below.name == "homedecor:kitchen_cabinet_with_sink" then local particledef = { outlet_x = 0, outlet_y = -0.44, @@ -229,7 +229,7 @@ homedecor.register("shower_head", { walkable = false, on_rightclick = function (pos, node, clicker) local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-2.0, z=pos.z}) - if below and string.find(below.name, "homedecor:shower_tray") then + if below and below.name == "homedecor:shower_tray" then local particledef = { outlet_x = 0, outlet_y = -0.42, diff --git a/homedecor/kitchen_furniture.lua b/homedecor/kitchen_furniture.lua index 618e0ae4..e583d141 100644 --- a/homedecor/kitchen_furniture.lua +++ b/homedecor/kitchen_furniture.lua @@ -116,8 +116,8 @@ homedecor.register("kitchen_faucet", { on_rightclick = function(pos, node, clicker) local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z}) if below and - string.find(below.name, "homedecor:sink") or - string.find(below.name, "homedecor:kitchen_cabinet_with_sink") then + below.name == "homedecor:sink" or + below.name == "homedecor:kitchen_cabinet_with_sink" then local particledef = { outlet_x = 0, outlet_y = -0.19,