Differences From
Artifact [0b54227d82]:
24 24 drawtype = "plantlike";
25 25 tiles = {image};
26 26 inventory_image = image;
27 27 paramtype = "light";
28 28 is_ground_content = false;
29 29 light_source = glow and math.min(minetest.LIGHT_MAX,glow) or 0;
30 30 drop = 'sorcery:' .. name;
31 - preserve_metadata = function(pos,node,meta,newstack)
32 - newstack[1]:get_meta():from_table(meta)
33 - end;
34 31 walkable = false;
35 32 selection_box = {
36 33 type = "fixed",
37 34 fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
38 35 };
39 36 on_construct = function(pos)
40 37 minetest.get_meta(pos):set_string('infotext',label)
................................................................................
43 40 }
44 41 if extra then for k,v in pairs(extra) do node[k] = v end end
45 42 if not node.groups then node.groups = {} end
46 43 node.groups.dig_immediate = 3;
47 44 node.groups.attached_node = 1;
48 45 node.groups.vessel = 1;
49 46 node.groups.not_in_creative_inventory = 1;
50 - minetest.register_node("sorcery:"..name, node)
47 + sorcery.lib.node.reg_autopreserve("sorcery:"..name, node)
51 48 end
52 49
53 50 sorcery.register_oil = function(name,label,desc,color,imgvariant,extra)
54 51 local image = 'xdecor_bowl.png^(sorcery_oil_' .. (imgvariant or 'dull') .. '.png^[colorize:'..tostring(color)..':140)'
55 52 sorcery.register.residue.link('sorcery:' .. name, 'xdecor:bowl')
56 53 extra.description = label;
57 54 extra.inventory_image = image;