sorcery  Diff

Differences From Artifact [e661ef77a3]:

To Artifact [3776b1d392]:


159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
...
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
			end
			return proto
		end;
		matprops = function(proto)
			local matprops = {}
			for k,v in pairs(proto) do
				if sorcery.wands.materials[k] then
					local mp = sorcery.wands.materials[k].wandprops
					if mp then
						matprops = sorcery.lib.tbl.deepmerge(matprops, mp,
							function(a,b,k)
								if key == 'bond'
									then return a+b
									else return a*b
								end
							end)
					end
				end
................................................................................
			angle = user:get_look_horizontal();
			eyeheight = uprops.eye_height;
		};
		wearmult = 1;
	}
	local result = castfn(context)
	if result ~= false then
		minetest.sound_play(sorcery.data.spells[spell].sound or "default_item_smoke", { --FIXME make own sounds
			pos = user:get_pos();
			gain = 0.8;
		})
		-- minetest.add_particle {
		-- 	pos = vector.add(vector.add(user:get_pos(), vector.multiply(user:get_look_dir(),1.1)), {y=1.6,z=0,x=0});
		-- 	velocity = user:get_velocity();
		-- 	expirationtime = 0.5;
................................................................................
		sunlight_propagates = true;
		paramtype = 'light';
		paramtype2 = 'facedir';
		tiles = images;
		selection_box = hitbox;
		collision_box = hitbox;
		after_dig_node = sorcery.lib.node.purge_container;
		use_texture_alpha = true;
		on_construct = function(pos)
			local meta = minetest.get_meta(pos)
			local inv = meta:get_inventory()
			inv:set_size('wand', 1)
			update_stand_info(pos)
		end;
		_proto = {







|


|







 







|







 







|







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
...
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
			end
			return proto
		end;
		matprops = function(proto)
			local matprops = {}
			for k,v in pairs(proto) do
				if sorcery.wands.materials[k] then
					local mp = sorcery.wands.materials[k][v].wandprops
					if mp then
						matprops = sorcery.lib.tbl.deepmerge(matprops, mp,
							function(a,b,key)
								if key == 'bond'
									then return a+b
									else return a*b
								end
							end)
					end
				end
................................................................................
			angle = user:get_look_horizontal();
			eyeheight = uprops.eye_height;
		};
		wearmult = 1;
	}
	local result = castfn(context)
	if result ~= false then
		minetest.sound_play(sorcery.data.spells[spell].sound or "sorcery_chime", { --FIXME make better sound
			pos = user:get_pos();
			gain = 0.8;
		})
		-- minetest.add_particle {
		-- 	pos = vector.add(vector.add(user:get_pos(), vector.multiply(user:get_look_dir(),1.1)), {y=1.6,z=0,x=0});
		-- 	velocity = user:get_velocity();
		-- 	expirationtime = 0.5;
................................................................................
		sunlight_propagates = true;
		paramtype = 'light';
		paramtype2 = 'facedir';
		tiles = images;
		selection_box = hitbox;
		collision_box = hitbox;
		after_dig_node = sorcery.lib.node.purge_container;
		use_texture_alpha = 'blend';
		on_construct = function(pos)
			local meta = minetest.get_meta(pos)
			local inv = meta:get_inventory()
			inv:set_size('wand', 1)
			update_stand_info(pos)
		end;
		_proto = {