6 Check for particle spawner compatibility for older MT client versions
This commit is contained in:
parent
d669edca24
commit
06f8015307
26
nodes.lua
26
nodes.lua
|
@ -431,7 +431,24 @@ minetest.register_node('everness:sulfur_stone', {
|
|||
return
|
||||
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,
|
||||
time = 4,
|
||||
size = {
|
||||
|
@ -460,7 +477,10 @@ minetest.register_node('everness:sulfur_stone', {
|
|||
length = 8
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
end
|
||||
|
||||
minetest.add_particlespawner(particlespawner_def)
|
||||
|
||||
Everness:tick_sulfur_stone(pos)
|
||||
end
|
||||
|
@ -4311,6 +4331,7 @@ minetest.register_node('everness:floating_crystal', {
|
|||
position = temp_pos
|
||||
|
||||
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({
|
||||
amount = 50,
|
||||
time = 1,
|
||||
|
@ -4341,6 +4362,7 @@ minetest.register_node('everness:floating_crystal', {
|
|||
},
|
||||
glow = 12
|
||||
})
|
||||
end
|
||||
|
||||
minetest.after(1, function(v_position2, v_position_prev2)
|
||||
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'
|
||||
then
|
||||
-- place crystal
|
||||
if minetest.has_feature({ dynamic_add_media_table = true, particlespawner_tweenable = true }) then
|
||||
minetest.add_particlespawner({
|
||||
amount = 50,
|
||||
time = 1,
|
||||
|
@ -104,6 +105,7 @@ minetest.register_tool('everness:pick_illuminating', {
|
|||
},
|
||||
glow = 12
|
||||
})
|
||||
end
|
||||
|
||||
minetest.set_node(pointed_thing.above, { name = 'everness:floating_crystal' })
|
||||
minetest.get_node_timer(pointed_thing.above):start(math.random(85, 95))
|
||||
|
|
Ŝarĝante…
Reference in New Issue