sorcery  Diff

Differences From Artifact [74f7716464]:

To Artifact [27d6ea2995]:


    15     15   			minetest.get_node_timer(pos):start(1)
    16     16   		end;
    17     17   		on_timer = function(pos,dtime)
    18     18   			local meta = minetest.get_meta(pos)
    19     19   			local elapsed = dtime + meta:get_float('duration') - meta:get_float('timeleft')
    20     20   			local level = 1 - (elapsed / meta:get_float('duration'))
    21     21   			local lum = math.ceil(level*meta:get_int('power'))
    22         -			print('elapsed time',elapsed)
    23         -			print('light level',level)
    24         -			print('lum',lum)
    25     22   			if lum ~= i then
    26     23   				if lum <= 0 then
    27     24   					minetest.remove_node(pos)
    28     25   					return false
    29     26   				else
    30     27   					minetest.swap_node(pos,{name='sorcery:air_glimmer_'..tostring(lum)})
    31     28   				end