increase particles and scatter range
parent
d77f358158
commit
61e5bcabc6
10
api.lua
10
api.lua
|
@ -14,7 +14,7 @@ API
|
||||||
particles = {}
|
particles = {}
|
||||||
|
|
||||||
-- dig_particles
|
-- dig_particles
|
||||||
particles.dig_particles = 8
|
particles.dig_particles = 12
|
||||||
|
|
||||||
-- registered_dig_particles
|
-- registered_dig_particles
|
||||||
particles.registered_dig_particles = {nodes={},textures={}}
|
particles.registered_dig_particles = {nodes={},textures={}}
|
||||||
|
@ -35,7 +35,7 @@ particles.register_dig_particle = function(node,texture,params)
|
||||||
local size = math.random(11,17)/100
|
local size = math.random(11,17)/100
|
||||||
entity.visual_size = {x=size, y=size}
|
entity.visual_size = {x=size, y=size}
|
||||||
entity.timer = math.random(100,150)/100
|
entity.timer = math.random(100,150)/100
|
||||||
entity.bounce = math.random(50,70)/100
|
entity.bounce = math.random(40,60)/100
|
||||||
entity.on_step = function(self, dtime)
|
entity.on_step = function(self, dtime)
|
||||||
self.timer = self.timer - dtime
|
self.timer = self.timer - dtime
|
||||||
if self.timer < 0 then
|
if self.timer < 0 then
|
||||||
|
@ -70,9 +70,9 @@ particles.on_dignode = function(pos, oldnode, digger)
|
||||||
z = pos.z+1-(math.random()*1.5)
|
z = pos.z+1-(math.random()*1.5)
|
||||||
}
|
}
|
||||||
location.vel = {
|
location.vel = {
|
||||||
x = math.random(-100,100)/100,
|
x = math.random(-300,300)/100,
|
||||||
y = math.random()*2,
|
y = math.random()*4,
|
||||||
z = math.random(-100,100)/100
|
z = math.random(-300,300)/100
|
||||||
}
|
}
|
||||||
node = "particles:"..particles.registered_dig_particles.nodes[oldnode.name]..i
|
node = "particles:"..particles.registered_dig_particles.nodes[oldnode.name]..i
|
||||||
e = minetest.env:add_entity(location.pos, node)
|
e = minetest.env:add_entity(location.pos, node)
|
||||||
|
|
Loading…
Reference in New Issue