forked from nalc/homedecor_modpack
Merge branch 'pg-fix-tap-particles' into 'master'
Fix the tap particles spilling out of the sink See merge request VanessaE/homedecor_modpack!4
This commit is contained in:
commit
0ab1040760
@ -81,11 +81,22 @@ homedecor.register("toilet_paper", {
|
|||||||
|
|
||||||
--Sink
|
--Sink
|
||||||
|
|
||||||
local sink_cbox = {
|
local sink_sbox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -5/16, -8/16, 1/16, 5/16, 8/16, 8/16 }
|
fixed = { -5/16, -8/16, 1/16, 5/16, 8/16, 8/16 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local sink_cbox = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{ -5/16, 5/16, 1/16, -4/16, 8/16, 8/16 },
|
||||||
|
{ 5/16, 5/16, 1/16, 4/16, 8/16, 8/16 },
|
||||||
|
{ -5/16, 5/16, 1/16, 5/16, 8/16, 2/16 },
|
||||||
|
{ -5/16, 5/16, 6/16, 5/16, 8/16, 8/16 },
|
||||||
|
{ -4/16, -8/16, 1/16, 4/16, 5/16, 6/16 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
homedecor.register("sink", {
|
homedecor.register("sink", {
|
||||||
description = S("Bathroom Sink"),
|
description = S("Bathroom Sink"),
|
||||||
mesh = "homedecor_bathroom_sink.obj",
|
mesh = "homedecor_bathroom_sink.obj",
|
||||||
@ -95,19 +106,10 @@ homedecor.register("sink", {
|
|||||||
"default_water.png"
|
"default_water.png"
|
||||||
},
|
},
|
||||||
inventory_image="homedecor_bathroom_sink_inv.png",
|
inventory_image="homedecor_bathroom_sink_inv.png",
|
||||||
selection_box = sink_cbox,
|
selection_box = sink_sbox,
|
||||||
|
collision_box = sink_cbox,
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{ -5/16, 5/16, 1/16, -4/16, 8/16, 8/16 },
|
|
||||||
{ 5/16, 5/16, 1/16, 4/16, 8/16, 8/16 },
|
|
||||||
{ -5/16, 5/16, 1/16, 5/16, 8/16, 2/16 },
|
|
||||||
{ -5/16, 5/16, 6/16, 5/16, 8/16, 8/16 },
|
|
||||||
{ -4/16, -8/16, 1/16, 4/16, 5/16, 6/16 }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z})
|
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z})
|
||||||
end
|
end
|
||||||
@ -127,7 +129,8 @@ local function taps_on_rightclick(pos, node, clicker, itemstack, pointed_thing)
|
|||||||
velocity_x = { min = -0.1, max = 0.1 },
|
velocity_x = { min = -0.1, max = 0.1 },
|
||||||
velocity_y = -0.3,
|
velocity_y = -0.3,
|
||||||
velocity_z = { min = -0.1, max = 0 },
|
velocity_z = { min = -0.1, max = 0 },
|
||||||
spread = 0
|
spread = 0,
|
||||||
|
die_on_collision = true,
|
||||||
}
|
}
|
||||||
homedecor.start_particle_spawner(pos, node, particledef, "homedecor_faucet")
|
homedecor.start_particle_spawner(pos, node, particledef, "homedecor_faucet")
|
||||||
end
|
end
|
||||||
|
@ -71,6 +71,7 @@ function homedecor.start_particle_spawner(pos, node, particledef, soundname)
|
|||||||
amount = 60,
|
amount = 60,
|
||||||
time = 0,
|
time = 0,
|
||||||
collisiondetection = true,
|
collisiondetection = true,
|
||||||
|
collision_removal = particledef.die_on_collision,
|
||||||
minpos = {x=pos.x - minx, y=pos.y + outlety, z=pos.z - minz},
|
minpos = {x=pos.x - minx, y=pos.y + outlety, z=pos.z - minz},
|
||||||
maxpos = {x=pos.x - maxx, y=pos.y + outlety, z=pos.z - maxz},
|
maxpos = {x=pos.x - maxx, y=pos.y + outlety, z=pos.z - maxz},
|
||||||
minvel = {x = minvelx, y = velocityy, z = minvelz},
|
minvel = {x = minvelx, y = velocityy, z = minvelz},
|
||||||
|
Loading…
Reference in New Issue
Block a user