sorcery  Diff

Differences From Artifact [f6fe98aba0]:

To Artifact [9c44805455]:

  • File entities.lua — part of check-in [ea6e475e44] at 2020-10-19 09:52:11 on branch trunk — continue dev on celestial mechanics, add melding+division spells (resonance), refine itemclasses, add keypunch and punchcards, add paper pulp, add a shitload of visuals, add convenience scripts for working with the wiki, make the flamebolt spell actually useful instead of just a pretty lightshow, add essences, inferno crystal, and other goodies; iterate on wands, lots of shit i can't remember, various bugfixes (user: lexi, size: 3718) [annotate] [blame] [check-ins using]

    64     64   			spawn(500,  10,20,   1.0, 1.8,  2.0,  0.2)
    65     65   			spawn(500,  10,20,   0.5, 1.0,  3.0,  0.5)
    66     66   		end
    67     67   
    68     68   		::collcheck:: do
    69     69   			-- if no collision then return end
    70     70   			local nname = minetest.get_node(pos).name 
    71         -			if nname == 'air' then return
           71  +			if nname == 'air' or minetest.registered_nodes[nname].walkable ~= true then return
    72     72   			elseif nname == 'ignore' then goto destroy end
    73     73   			-- else fall through to explode
    74     74   		end
    75     75   
    76     76   		::explode:: do
    77         -			minetest.add_particle({
    78         -				pos = pos,
    79         -				velocity     = { x = 0, y = 0, z = 0 };
    80         -				acceleration = { x = 0, y = 0, z = 0 };
    81         -				expirationtime = 0.4,
    82         -				size = 50,
    83         -				collisiondetection = false,
    84         -				vertical = false,
    85         -				texture = "tnt_boom.png",
    86         -				glow = 14,
    87         -			})
           77  +			-- minetest.add_particle({
           78  +			-- 	pos = pos,
           79  +			-- 	velocity     = { x = 0, y = 0, z = 0 };
           80  +			-- 	acceleration = { x = 0, y = 0, z = 0 };
           81  +			-- 	expirationtime = 0.4,
           82  +			-- 	size = 50,
           83  +			-- 	collisiondetection = false,
           84  +			-- 	vertical = false,
           85  +			-- 	texture = "tnt_boom.png",
           86  +			-- 	glow = 14,
           87  +			-- })
    88     88   
    89     89   			local boom = function(len,num,speed)
    90         -				minetest.add_particlespawner {
    91         -					amount = num;
    92         -					time = len;
    93         -					minpos = vector.subtract(pos, 1.2);
    94         -					maxpos = vector.add(pos, 1,2);
    95         -					minvel = vector.multiply({ x = -10; y = -10; z = -10; }, speed);
    96         -					maxvel = vector.multiply({ x =  10; y =  10; z =  10; }, speed);
    97         -					minacc = vector.multiply({ x =  -1; y =  -1; z =  -1; }, speed);
    98         -					maxacc = vector.multiply({ x =   1; y =   1; z =   1; }, speed);
    99         -					minexptime = 0.1;
   100         -					maxexptime = 0.3;
   101         -					minsize = 6;
   102         -					maxsize = 25;
   103         -					texture = 'tnt_smoke.png';
   104         -				}
           90  +				-- minetest.add_particlespawner {
           91  +				-- 	amount = num;
           92  +				-- 	time = len;
           93  +				-- 	minpos = vector.subtract(pos, 1.2);
           94  +				-- 	maxpos = vector.add(pos, 1,2);
           95  +				-- 	minvel = vector.multiply({ x = -10; y = -10; z = -10; }, speed);
           96  +				-- 	maxvel = vector.multiply({ x =  10; y =  10; z =  10; }, speed);
           97  +				-- 	minacc = vector.multiply({ x =  -1; y =  -1; z =  -1; }, speed);
           98  +				-- 	maxacc = vector.multiply({ x =   1; y =   1; z =   1; }, speed);
           99  +				-- 	minexptime = 0.1;
          100  +				-- 	maxexptime = 0.3;
          101  +				-- 	minsize = 6;
          102  +				-- 	maxsize = 25;
          103  +				-- 	texture = 'tnt_smoke.png';
          104  +				-- }
   105    105   			end
   106    106   			boom(0.7, 140, 0.8)
   107         -			minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 40}, true)
          107  +			-- minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 40}, true)
          108  +			tnt.boom(pos, {
          109  +				radius = self._blastradius;
          110  +			})
   108    111   		end
   109    112   
   110    113   		::destroy:: do
   111    114   			if self._meta then for _,v in pairs(self._meta.emitters) do
   112    115   				minetest.delete_particlespawner(v)
   113    116   			end end
   114    117   			self.object:remove()
   115    118   		end
   116    119   	end;
   117    120   })
   118    121