384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
|
local duration = (ctx.base.gem == 'amethyst' and 60) or 30
if ctx.base.gem == 'diamond' then
power = power * (math.random()*2)
range = range * (math.random()*2)
duration = duration * (math.random()*2)
end
local lum = math.ceil((power/maxpower) * minetest.LIGHT_MAX)
print('setting lum',lum)
for i=1,power do
local pos = vector.add(center, {
x = math.random(-range,range);
z = math.random(-range,range);
y = math.random(0,range/2);
})
local delta = vector.subtract(pos,center)
|
|
384
385
386
387
388
389
390
391
392
393
394
395
396
397
|
local duration = (ctx.base.gem == 'amethyst' and 60) or 30
if ctx.base.gem == 'diamond' then
power = power * (math.random()*2)
range = range * (math.random()*2)
duration = duration * (math.random()*2)
end
local lum = math.ceil((power/maxpower) * minetest.LIGHT_MAX)
for i=1,power do
local pos = vector.add(center, {
x = math.random(-range,range);
z = math.random(-range,range);
y = math.random(0,range/2);
})
local delta = vector.subtract(pos,center)
|