sorcery  Diff

Differences From Artifact [6a40bd16e3]:

To Artifact [02b94765c1]:


194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
...
244
245
246
247
248
249
250

251
252
253
254
255
256
257
...
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
				L.image(fmt('sorcery_liquid_%s.png', liq.imgvariant or 'dull'))
					:multiply(L.color(liq.color))):render()

		-- local img_glass = L.image('vessels_drinking_glass.png'):blit(
		-- 		L.image(fmt('sorcery_liquid_glass_%s.png', liq.imgvariant or 'dull'))
		-- 			:multiply(L.color(liq.color)))

		minetest.register_node(':'..bottle, {
			description = liq.desc_bottle or fmt('%s Bottle', L.str.capitalize(liq.name));
			inventory_image = img_bottle;
			drawtype = 'plantlike', tiles = {img_bottle};
			is_ground_content = false, walkable = false;
			sunlight_propagates = true, paramtype = 'light';
			light_source = liq.glow or 0;
			selection_box = { type = 'fixed', fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} };
................................................................................
		pos = pos;
	}, true)
end;

sorcery.liquid.sound_dip = function(amt_output, amt_basin, pos)
	sorcery.liquid.sound_pour(amt_output, amt_basin, pos)
end;


-- pre-register basic liquids used in Sorcery and common ones sorcery depends on

sorcery.liquid.register{
	id = 'default:water';
	name = 'water';
	kind = 'default:drink';
................................................................................
		['vessels:glass_bottle'] = 'sorcery:blood';
	};
}

minetest.register_abm {
	label = 'Rainfall';
	nodenames = {'group:sorcery_collect_rainwater'};
	interval =  230;
	chance = 40;
	min_y = -400;
	catch_up = true;
	action = function(pos, node)
		-- TODO vary by season and biome?
		if minetest.get_natural_light(vector.offset(pos,0,1,0), 0.5) >= 15 then
			if node.name == 'sorcery:trough' then
				node.name = 'default:trough_water_1'







|







 







>







 







|
|







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
...
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
...
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
				L.image(fmt('sorcery_liquid_%s.png', liq.imgvariant or 'dull'))
					:multiply(L.color(liq.color))):render()

		-- local img_glass = L.image('vessels_drinking_glass.png'):blit(
		-- 		L.image(fmt('sorcery_liquid_glass_%s.png', liq.imgvariant or 'dull'))
		-- 			:multiply(L.color(liq.color)))

		sorcery.lib.node.reg_autopreserve(':'..bottle, {
			description = liq.desc_bottle or fmt('%s Bottle', L.str.capitalize(liq.name));
			inventory_image = img_bottle;
			drawtype = 'plantlike', tiles = {img_bottle};
			is_ground_content = false, walkable = false;
			sunlight_propagates = true, paramtype = 'light';
			light_source = liq.glow or 0;
			selection_box = { type = 'fixed', fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} };
................................................................................
		pos = pos;
	}, true)
end;

sorcery.liquid.sound_dip = function(amt_output, amt_basin, pos)
	sorcery.liquid.sound_pour(amt_output, amt_basin, pos)
end;


-- pre-register basic liquids used in Sorcery and common ones sorcery depends on

sorcery.liquid.register{
	id = 'default:water';
	name = 'water';
	kind = 'default:drink';
................................................................................
		['vessels:glass_bottle'] = 'sorcery:blood';
	};
}

minetest.register_abm {
	label = 'Rainfall';
	nodenames = {'group:sorcery_collect_rainwater'};
	interval =  120;
	chance = 27;
	min_y = -400;
	catch_up = true;
	action = function(pos, node)
		-- TODO vary by season and biome?
		if minetest.get_natural_light(vector.offset(pos,0,1,0), 0.5) >= 15 then
			if node.name == 'sorcery:trough' then
				node.name = 'default:trough_water_1'