sorcery  Diff

Differences From Artifact [8567a33693]:

To Artifact [48046fb0bd]:


   148    148   			animation = {
   149    149   				type = 'vertical_frames', length = far/vel;
   150    150   				aspect_w = 16, aspect_h = 16;
   151    151   			};
   152    152   		}
   153    153   	end
   154    154   end
          155  +
          156  +function sorcery.vfx.drip(liquid, noz, amt, time, exp)
          157  +	if type(liquid) == 'string' then liquid = sorcery.register.liquid.db[liquid] end
          158  +	local minnoz = vector.offset(noz, -0.03, 0.0, -0.03);
          159  +	local maxnoz = vector.offset(noz,  0.03, 0.0,  0.03);
          160  +	local drop = sorcery.lib.image('sorcery_drop.png'):multiply(liquid.color)
          161  +	return minetest.add_particlespawner {
          162  +		amount = amt, time = time;
          163  +		texture = drop:render();
          164  +		minpos = minnoz, maxpos = maxnoz;
          165  +		minvel = vector.new(0,0,0);
          166  +		maxvel = vector.new(0,-0.2,0);
          167  +		minacc = vector.new(0,-0.2,0);
          168  +		maxacc = vector.new(0,-0.23,0);
          169  +		minsize = 0.4, maxsize = 1;
          170  +		glow = liquid.glow or 2;
          171  +		minexptime = exp, maxexptime = exp;
          172  +		animation = {
          173  +			type = 'sheet_2d';
          174  +			frames_w = 10;
          175  +			frames_h = 1;
          176  +			frame_length = (exp/10) + 0.01;
          177  +		};
          178  +		vertical = true;
          179  +	}
          180  +end