Differences From
Artifact [36308ba599]:
- File
itemclass.lua
— part of check-in
[ea6e475e44]
at
2020-10-19 09:52:11
on branch trunk
— continue dev on celestial mechanics, add melding+division spells (resonance), refine itemclasses, add keypunch and punchcards, add paper pulp, add a shitload of visuals, add convenience scripts for working with the wiki, make the flamebolt spell actually useful instead of just a pretty lightshow, add essences, inferno crystal, and other goodies; iterate on wands, lots of shit i can't remember, various bugfixes
(user:
lexi,
size: 4530)
[annotate]
[blame]
[check-ins using]
- File
itemclass.lua
— part of check-in
[96c5289a2a]
at
2020-10-21 03:35:35
on branch trunk
— add rune forges, runes, amulet frames, write sacrifice spell, touch up amulet graphics, enable enchantment of amulets (though spells cannot yet be cast), defuckulate syncresis core icon, unfuckitize sneaky leycalc bug that's probably been the cause of some long-standing wackiness, add item classes, add some more textures, disbungle various other asstastrophes, remove sneaky old debug code, improve library code, add utility for uploading merge requests
(user:
lexi,
size: 5018)
[annotate]
[blame]
[check-ins using]
75 75 end;
76 76 };
77 77 metallic = {
78 78 subclass = {'metal'};
79 79 predicate = function(name)
80 80 -- matreg is a registry binding crafted items,
81 81 -- like armors and tools, to the material they
82 - -- are made out of
82 + -- are made out of. it's necessary because not
83 + -- all items we want to interact with have
84 + -- definitions under our control
83 85 local mat = sorcery.matreg.lookup[name]
84 86 if mat and mat.metal then return mat end
85 87 local prop = minetest.registered_items[name]._sorcery
86 88 if prop and prop.material and prop.material.metal then
87 89 return prop.material
88 90 end
89 91 end;
90 92 };
93 + material = {
94 + subclass = {'metallic','crystalline'};
95 + };
91 96 ore = {
92 97 groups = { 'ore' };
93 98 compat = 'ore';
94 99 predicate = function(name)
95 100 -- maybe revise this at some point once sorcery is extricated
96 101 -- from instant_ores and we have more control over the items
97 102 -- we generate
................................................................................
103 108 return { metal = true, id = iname }
104 109 elseif sorcery.data.gems[iname] then
105 110 return { gem = true, id = iname }
106 111 end
107 112 end
108 113 end;
109 114 };
110 - -- fuel = {};
115 + fuel = {
116 + groups = {'fuel','flammable'};
117 + predicate = function(name)
118 + local c,di = minetest.get_craft_result {
119 + method = 'fuel';
120 + width = 1;
121 + items = { ItemStack(name) };
122 + }
123 + if c.time and c.time > 0 then
124 + return {
125 + burntime = c.time;
126 + leftover = di and di[1];
127 + }
128 + end
129 + end;
130 + };
111 131 };
112 132 get = function(name,class)
113 133 local c = sorcery.itemclass.classes[class]
114 134 local o
115 135 if not c then return false end
116 136 if type(name) ~= 'string' then name = name:get_name() end
117 137