113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
local glow = v.glow
local id = 'potion_' .. string.lower(n)
local desc = 'A ' .. ((glow and 'glowing ') or '') ..
'bottle of ' .. string.lower(n) ..
((kind == 'sparkle' and ', fiercely bubbling') or '') ..
' liquid'
local fullname = n .. ' Potion'
sorcery.register_potion(id, fullname, desc, color, kind, glow, {
_proto = v;
groups = {
sorcery_potion = 1;
sorcery_magical = 1;
};
})
create_infusion_recipe(id,v,'sorcery:potion_serene',{data=v,name=fullname})
end)
-- for n,potion in pairs(sorcery.data.draughts) do
sorcery.register.draughts.foreach('sorcery:mknodes',{},function(n,potion)
|
|
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
local glow = v.glow
local id = 'potion_' .. string.lower(n)
local desc = 'A ' .. ((glow and 'glowing ') or '') ..
'bottle of ' .. string.lower(n) ..
((kind == 'sparkle' and ', fiercely bubbling') or '') ..
' liquid'
local fullname = n .. ' Potion'
sorcery.register.liquid.link('sorcery:'..id, {
name = 'Serene Potion';
color = v.color;
proto = v;
kind = 'sorcery:potion';
measure = function(amt) return string.format('%s draughts', amt / 3) end;
containers = {
['vessels:glass_bottle'] = 'sorcery:' .. id;
};
})
sorcery.register_potion(id, fullname, desc, color, kind, glow, {
groups = {
sorcery_potion = 1;
sorcery_magical = 1;
};
_proto = v;
_sorcery = {
container = {
type = 'vessel';
hold = 'liquid';
has = 'sorcery:' .. id;
empty = 'vessels:glass_bottle';
charge = 3;
};
};
})
create_infusion_recipe(id,v,'sorcery:potion_serene',{data=v,name=fullname})
end)
-- for n,potion in pairs(sorcery.data.draughts) do
sorcery.register.draughts.foreach('sorcery:mknodes',{},function(n,potion)
|