55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
};
predicate = function(name)
local def = minetest.registered_items[name]._sorcery
if not def then return nil end
def = def.material
if def and def.grindvalue then
return {
hardness = def.data.hardness;
grindcost = def.grindcost or 1;
grindvalue = def.grindvalue;
powder = def.powder or def.data.parts.powder;
}
end
end;
};
metal = {
predicate = function(name)
................................................................................
return { metal = true, id = iname }
elseif sorcery.data.gems[iname] then
return { gem = true, id = iname }
end
end
end;
};
};
get = function(name,class)
local c = sorcery.itemclass.classes[class]
local o
if not c then return false end
if type(name) ~= 'string' then name = name:get_name() end
|
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
};
predicate = function(name)
local def = minetest.registered_items[name]._sorcery
if not def then return nil end
def = def.material
if def and def.grindvalue then
return {
hardness = def.hardness or def.data.hardness;
grindcost = def.grindcost or 1;
grindvalue = def.grindvalue or def.value;
powder = def.powder or def.data.parts.powder;
}
end
end;
};
metal = {
predicate = function(name)
................................................................................
return { metal = true, id = iname }
elseif sorcery.data.gems[iname] then
return { gem = true, id = iname }
end
end
end;
};
-- fuel = {};
};
get = function(name,class)
local c = sorcery.itemclass.classes[class]
local o
if not c then return false end
if type(name) ~= 'string' then name = name:get_name() end
|