sorcery  Diff

Differences From Artifact [56d754e26c]:

  • File itemclass.lua — part of check-in [3f6a913e4e] at 2020-09-29 12:40:28 on branch trunk — * remove former hacky registration system, replace with consistent and flexible API; rewrite metal/gem generation to take advantage of this new API; tweaks to init system to enable world-local tweaks to lore and sorcery behavior * initial documentation commit * initial steps towards calendar - add default date format, astrolabe; prepare infra for division/melding/transmutation spells, various tweaks and fixes (user: lexi, size: 4485) [annotate] [blame] [check-ins using]

To 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]

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