mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-11-15 14:50:37 +01:00
fix facedir detection on coffee steam, increase ABM interval, fix indentation
This commit is contained in:
parent
689f9a8b43
commit
71fb6f9e91
|
@ -1182,16 +1182,27 @@ minetest.register_node("homedecor:coffee_maker", {
|
|||
}
|
||||
})
|
||||
|
||||
local fdir_to_steampos = {
|
||||
x = { 0.15, 0.275, -0.15, -0.275 },
|
||||
z = { 0.275, -0.15, -0.275, 0.15 }
|
||||
}
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = "homedecor:coffee_maker",
|
||||
interval = 1,
|
||||
interval = 2,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
local fdir = node.param2
|
||||
if fdir and fdir < 4 then
|
||||
|
||||
local steamx = fdir_to_steampos.x[fdir + 1]
|
||||
local steamz = fdir_to_steampos.z[fdir + 1]
|
||||
|
||||
minetest.add_particlespawner({
|
||||
amount = 1,
|
||||
time = 1,
|
||||
minpos = {x=pos.x-0.15, y=pos.y-0.35, z=pos.z-0.275},
|
||||
maxpos = {x=pos.x-0.15, y=pos.y-0.35, z=pos.z-0.275},
|
||||
minpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
maxpos = {x=pos.x - steamx, y=pos.y - 0.35, z=pos.z - steamz},
|
||||
minvel = {x=-0.003, y=0.01, z=-0.003},
|
||||
maxvel = {x=0.003, y=0.01, z=-0.003},
|
||||
minacc = {x=0.0,y=-0.0,z=-0.0},
|
||||
|
@ -1204,6 +1215,7 @@ minetest.register_abm({
|
|||
texture = "homedecor_steam.png",
|
||||
})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:dartboard", {
|
||||
|
|
Loading…
Reference in New Issue
Block a user