sorcery  Diff

Differences From Artifact [f9db217ceb]:

  • File metal.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: 6107) [annotate] [blame] [check-ins using]

To Artifact [57d631c78f]:

  • File metal.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: 6622) [annotate] [blame] [check-ins using]

    80     80   	sorcery.data.metallookup[fragment] = {
    81     81   		id = name; data = metal;
    82     82   		value = 1;
    83     83   	}
    84     84   	minetest.register_craftitem(screw, {
    85     85   		description = sorcery.lib.str.capitalize(name) .. ' Screw';
    86     86   		inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render();
           87  +		groups = {
           88  +			metal = 1;
           89  +			sorcery_screw = 1;
           90  +			sorcery_tech_component = 1;
           91  +		};
    87     92   		_sorcery = {
    88     93   			material = {
    89     94   				id = name, data = metal;
    90     95   				grindcost = 2, grindvalue = 1;
    91     96   				value = 0.5;
    92     97   			};
    93     98   		};
................................................................................
    98    103   	})
    99    104   	if metal.dye then
   100    105   		minetest.register_craft {
   101    106   			output = 'dye:' .. metal.dye .. ' 4';
   102    107   			recipe = {
   103    108   				{'',     powder,                   ''};
   104    109   				{powder,'basic_materials:paraffin',powder};
   105         -				{'','bucket:bucket_water',''};
          110  +				{'',    'bucket:bucket_water',     ''};
   106    111   			};
   107    112   			replacements = {
   108    113   				{'bucket:bucket_water', 'bucket:bucket_empty'};
   109    114   			};
   110    115   		};
   111    116   	end
   112    117   	-- TODO: replace crafting recipe with kiln recipe
................................................................................
   140    145   			level = math.ceil(((metal.hardness/8) * 3)) + 1;
   141    146   			ingot_image = (metal.image and metal.image.ingot) or nil;
   142    147   			ore_image = 'default_stone.png^sorcery_' .. name .. '_ore.png';
   143    148   			lump_image = (metal.image and metal.image.lump) or nil;
   144    149   			armor_weight = metal.armor_weight;
   145    150   			armor_protection = metal.armor_protection;
   146    151   		}
          152  +	end
          153  +	local ti = (metal.image and metal.image.tool)
          154  +	for _,t in pairs{'pick','sword'} do
          155  +		-- i really need to rip out instant-ores already
          156  +		local tid = string.format('sorcery:%s_%s',t,name)
          157  +		if minetest.registered_items[tid] then
          158  +			minetest.override_item(tid, {
          159  +				inventory_image = ti and ti.pick or string.format('sorcery_%s_%s.png',name,t);
          160  +			})
          161  +		end
   147    162   	end
   148    163   	minetest.register_craftitem(fragment, {
   149    164   		inventory_image = 'sorcery_' .. name .. '_fragment.png';
   150    165   		description = sorcery.lib.str.capitalize(name) .. ' Fragment';
          166  +		groups = {
          167  +			metal = 1; sorcery_metal_fragment = 1;
          168  +		};
   151    169   		_sorcery = {
   152    170   			recipe = {
   153    171   				canonical = {
   154    172   					cook = {{ingot}};
   155    173   				};
   156    174   			};
   157    175   		};