sorcery  liquid.lua at [e408b8d0e0]

File liquid.lua artifact a02ac21c24 part of check-in e408b8d0e0


-- liquid.lua
-- the liquid registry is used to keep track of abstract liquids,
-- their properties, and their representation in-game.

sorcery.registry.mk('liquid', false)
sorcery.liquid = {}

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

sorcery.register.liquid.link('default:water', {
	name = 'water';
	kind = 'default:drink';
	color = {10,85,255};
	proto = nil;
	src = 'default:water_source';
	containers = {
		['vessels:glass_bottle'] = 'sorcery:potion_water';
		['bucket:bucket_empty'] = 'bucket:bucket_water';
	};
})

sorcery.register.liquid.link('farming:ethanol', {
	name = 'ethanol';
	kind = 'default:fuel';
	color = {175,185,130};
	proto = nil;
	measure = function(u) return string.format('%s pints', u * 5) end;
	containers = {
		['vessels:glass_bottle'] = 'farming:ethanol_bottle';
	};
})

sorcery.register.liquid.link('sorcery:blood', {
	name = 'blood';
	kind = 'sorcery:reagent';
	color = {255,10,30};
	proto = nil;
	measure = function(u) return string.format('%s cc', u * 236.5) end;
	containers = {
		['vessels:glass_bottle'] = 'sorcery:blood';
	};
})