6 Check for particle spawner compatibility for older MT client versions
This commit is contained in:
commit
716dcc337b
26
nodes.lua
26
nodes.lua
|
@ -431,7 +431,24 @@ minetest.register_node('everness:sulfur_stone', {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.add_particlespawner({
|
local particlespawner_def = {
|
||||||
|
amount = 1,
|
||||||
|
time = 4,
|
||||||
|
minpos = vector.new({ x = pos.x - 0.25, y = pos.y + 0.6, z = pos.z - 0.25 }),
|
||||||
|
maxpos = vector.new({ x = pos.x + 0.25, y = pos.y + 0.6, z = pos.z + 0.25 }),
|
||||||
|
minvel = vector.new({ x = -0.1, y = 0.25, z = -0.1 }),
|
||||||
|
maxvel = vector.new({ x = 0.1, y = 0.5, z = 0.1 }),
|
||||||
|
minacc = vector.new({ x = -0.1, y = 0.25, z = -0.1 }),
|
||||||
|
maxacc = vector.new({ x = 0.1, y = 0.5, z = 0.1 }),
|
||||||
|
minexptime = 7.5,
|
||||||
|
maxexptime = 7.5,
|
||||||
|
minsize = 16,
|
||||||
|
maxsize = 24,
|
||||||
|
texture = 'everness_smoke_cloud_particle_static.png',
|
||||||
|
}
|
||||||
|
|
||||||
|
if minetest.has_feature({ dynamic_add_media_table = true, particlespawner_tweenable = true }) then
|
||||||
|
particlespawner_def = {
|
||||||
amount = 1,
|
amount = 1,
|
||||||
time = 4,
|
time = 4,
|
||||||
size = {
|
size = {
|
||||||
|
@ -460,7 +477,10 @@ minetest.register_node('everness:sulfur_stone', {
|
||||||
length = 8
|
length = 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.add_particlespawner(particlespawner_def)
|
||||||
|
|
||||||
Everness:tick_sulfur_stone(pos)
|
Everness:tick_sulfur_stone(pos)
|
||||||
end
|
end
|
||||||
|
@ -4311,6 +4331,7 @@ minetest.register_node('everness:floating_crystal', {
|
||||||
position = temp_pos
|
position = temp_pos
|
||||||
|
|
||||||
minetest.after(i - 1, function(v_position, v_position_prev)
|
minetest.after(i - 1, function(v_position, v_position_prev)
|
||||||
|
if minetest.has_feature({ dynamic_add_media_table = true, particlespawner_tweenable = true }) then
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 50,
|
amount = 50,
|
||||||
time = 1,
|
time = 1,
|
||||||
|
@ -4341,6 +4362,7 @@ minetest.register_node('everness:floating_crystal', {
|
||||||
},
|
},
|
||||||
glow = 12
|
glow = 12
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
minetest.after(1, function(v_position2, v_position_prev2)
|
minetest.after(1, function(v_position2, v_position_prev2)
|
||||||
minetest.set_node(v_position2, { name = 'everness:floating_crystal' })
|
minetest.set_node(v_position2, { name = 'everness:floating_crystal' })
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 122 B |
|
@ -74,6 +74,7 @@ minetest.register_tool('everness:pick_illuminating', {
|
||||||
and minetest.get_node(pointed_thing.above).name == 'air'
|
and minetest.get_node(pointed_thing.above).name == 'air'
|
||||||
then
|
then
|
||||||
-- place crystal
|
-- place crystal
|
||||||
|
if minetest.has_feature({ dynamic_add_media_table = true, particlespawner_tweenable = true }) then
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 50,
|
amount = 50,
|
||||||
time = 1,
|
time = 1,
|
||||||
|
@ -104,6 +105,7 @@ minetest.register_tool('everness:pick_illuminating', {
|
||||||
},
|
},
|
||||||
glow = 12
|
glow = 12
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
minetest.set_node(pointed_thing.above, { name = 'everness:floating_crystal' })
|
minetest.set_node(pointed_thing.above, { name = 'everness:floating_crystal' })
|
||||||
minetest.get_node_timer(pointed_thing.above):start(math.random(85, 95))
|
minetest.get_node_timer(pointed_thing.above):start(math.random(85, 95))
|
||||||
|
|
Ŝarĝante…
Reference in New Issue