pass outlet position to particle handler as a table rather than separate vars

This commit is contained in:
Vanessa Ezekowitz 2015-05-10 22:34:30 -04:00
parent b5433d8c39
commit e010bdeb27
3 changed files with 6 additions and 12 deletions

View File

@ -121,9 +121,7 @@ local function taps_on_rightclick(pos, node, clicker)
below.name == "homedecor:sink" or
below.name == "homedecor:kitchen_cabinet_with_sink" then
local particledef = {
outlet_x = 0,
outlet_y = -0.44,
outlet_z = 0.28,
outlet = { x = 0, y = -0.44, z = 0.28 },
velocity_x = { min = -0.1, max = 0.1 },
velocity_y = -0.3,
velocity_z = { min = -0.1, max = 0 },
@ -231,9 +229,7 @@ homedecor.register("shower_head", {
local below = minetest.get_node_or_nil({x=pos.x, y=pos.y-2.0, z=pos.z})
if below and below.name == "homedecor:shower_tray" then
local particledef = {
outlet_x = 0,
outlet_y = -0.42,
outlet_z = 0.1,
outlet = { x = 0, y = -0.42, z = 0.1 },
velocity_x = { min = -0.15, max = 0.15 },
velocity_y = -2,
velocity_z = { min = -0.3, max = 0.1 },

View File

@ -39,9 +39,9 @@ function homedecor.start_particle_spawner(pos, node, particledef, soundname)
if fdir and fdir < 4 and (not id or id == 0) then
local outletx = particledef.outlet_x
local outlety = particledef.outlet_y
local outletz = particledef.outlet_z
local outletx = particledef.outlet.x
local outlety = particledef.outlet.y
local outletz = particledef.outlet.z
local velocityx = particledef.velocity_x
local velocityy = particledef.velocity_y
local velocityz = particledef.velocity_z

View File

@ -119,9 +119,7 @@ homedecor.register("kitchen_faucet", {
below.name == "homedecor:sink" or
below.name == "homedecor:kitchen_cabinet_with_sink" then
local particledef = {
outlet_x = 0,
outlet_y = -0.19,
outlet_z = 0.13,
outlet = { x = 0, y = -0.19, z = 0.13 },
velocity_x = { min = -0.05, max = 0.05 },
velocity_y = -0.3,
velocity_z = { min = -0.1, max = 0 },