don't use string.find() where == will do.

This commit is contained in:
Vanessa Ezekowitz 2015-05-10 22:30:53 -04:00
parent 3621d35bfd
commit b5433d8c39
2 changed files with 6 additions and 6 deletions

View File

@ -117,9 +117,9 @@ homedecor.register("sink", {
local function taps_on_rightclick(pos, node, clicker) 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}) local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z})
if below and if below and
string.find(below.name, "homedecor:shower_tray") or below.name == "homedecor:shower_tray" or
string.find(below.name, "homedecor:sink") or below.name == "homedecor:sink" or
string.find(below.name, "homedecor:kitchen_cabinet_with_sink") then below.name == "homedecor:kitchen_cabinet_with_sink" then
local particledef = { local particledef = {
outlet_x = 0, outlet_x = 0,
outlet_y = -0.44, outlet_y = -0.44,
@ -229,7 +229,7 @@ homedecor.register("shower_head", {
walkable = false, walkable = false,
on_rightclick = function (pos, node, clicker) on_rightclick = function (pos, node, clicker)
local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-2.0, z=pos.z}) 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 = { local particledef = {
outlet_x = 0, outlet_x = 0,
outlet_y = -0.42, outlet_y = -0.42,

View File

@ -116,8 +116,8 @@ homedecor.register("kitchen_faucet", {
on_rightclick = function(pos, node, clicker) on_rightclick = function(pos, node, clicker)
local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z}) local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z})
if below and if below and
string.find(below.name, "homedecor:sink") or below.name == "homedecor:sink" or
string.find(below.name, "homedecor:kitchen_cabinet_with_sink") then below.name == "homedecor:kitchen_cabinet_with_sink" then
local particledef = { local particledef = {
outlet_x = 0, outlet_x = 0,
outlet_y = -0.19, outlet_y = -0.19,