sorcery  Diff

Differences From Artifact [41529558e5]:

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

To Artifact [ef0242a63b]:

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

    49     49   	};
    50     50   	output = 'basic_materials:plastic_strip 3';
    51     51   	replacements = {
    52     52   		{'group:scissors','group:scissors'};
    53     53   	};
    54     54   }
    55     55   
    56         ---[[
    57         -minetest.register_craft {
    58         -	type = "shapeless";
    59         -	recipe = {
    60         -		"farming:mortar_pestle",
    61         -		"farming:sugar",
    62         -		"group:food_blueberries",
    63         -		"group:food_raspberries",
    64         -		"sorcery:extract_wheat",
    65         -		"sorcery:extract_wheat",
    66         -		"xdecor:bowl"
    67         -	};
    68         -	output = "sorcery:oil_mystic";
    69         -	replacements = {
    70         -		{ "farming:mortar_pestle", "farming:mortar_pestle" },
    71         -		{ "sorcery:extract_wheat", "vessels:glass_bottle" },
    72         -		{ "sorcery:extract_wheat", "vessels:glass_bottle" }
    73         -	};
    74         -}
    75         -
    76         -minetest.register_craft {
    77         -	type = "shapeless";
    78         -	recipe = {
    79         -		"farming:mortar_pestle",
    80         -		"group:food_berry",
    81         -		"group:food_berry",
    82         -		"group:food_berry",
    83         -		"xdecor:bowl"
    84         -	};
    85         -	output = "sorcery:oil_berry";
    86         -	replacements = {
    87         -		{ "farming:mortar_pestle", "farming:mortar_pestle" }
    88         -	};
    89         -}
    90         -
    91         -minetest.register_craft {
    92         -	type = "shapeless";
    93         -	recipe = {
    94         -		"farming:mortar_pestle",
    95         -		"group:food_mushroom",
    96         -		"group:food_mushroom",
    97         -		"group:food_mushroom",
    98         -		"xdecor:bowl"
    99         -	};
   100         -	output = "sorcery:oil_mushroom";
   101         -	replacements = {
   102         -		{ "farming:mortar_pestle", "farming:mortar_pestle" }
   103         -	};
   104         -}
   105         -]]
   106         ---[[
   107         -minetest.register_craft {
   108         -	type = "shapeless";
   109         -	recipe = {
   110         -		"farming:mixing_bowl",
   111         -		"sorcery:grease_pine",
   112         -		"sorcery:extract_cotton",
   113         -		"sorcery:extract_cotton",
   114         -		"sorcery:extract_cotton"
   115         -	};
   116         -	output = "sorcery:oil_whisper";
   117         -	replacements = {
   118         -		{'farming:mixing_bowl', 'farming:mixing_bowl'};
   119         -		{'sorcery:extract_cotton', 'vessels:glass_bottle'};
   120         -		{'sorcery:extract_cotton', 'vessels:glass_bottle'};
   121         -		{'sorcery:extract_cotton', 'vessels:glass_bottle'};
   122         -	};
   123         -}
   124         -
   125         -minetest.register_craft {
   126         -	type = "shapeless";
   127         -	recipe = {
   128         -		"farming:mixing_bowl";
   129         -		"sorcery:oil_whisper";
   130         -		"sorcery:pine_grease";
   131         -		"sorcery:extract_rye";
   132         -		"sorcery:extract_rye";
   133         -		"sorcery:extract_barley";
   134         -		"farming:salt";
   135         -	};
   136         -	output = "sorcery:oil_wind 2";
   137         -	replacements = {
   138         -		{'farming:mixing_bowl', 'farming:mixing_bowl'};
   139         -		{'sorcery:extract_rye', 'vessels:glass_bottle'};
   140         -		{'sorcery:extract_rye', 'vessels:glass_bottle'};
   141         -		{'sorcery:extract_barley', 'vessels:glass_bottle'};
   142         -	};
   143         -}
   144         -
   145         -minetest.register_craft {
   146         -	type = 'shapeless';
   147         -	recipe = {
   148         -		"farming:mixing_bowl";
   149         -		'sorcery:oil_fog';
   150         -		'sorcery:oil_wind';
   151         -		'sorcery:blood';
   152         -		'sorcery:blood';
   153         -		'sorcery:blood';
   154         -	};
   155         -	output = 'sorcery:grease_storm 2';
   156         -	replacements = {
   157         -		{'farming:mixing_bowl', 'farming:mixing_bowl'};
   158         -		{'sorcery:blood', 'vessels:glass_bottle' }
   159         -	}
   160         -}
   161         -
   162         -minetest.register_craft {
   163         -	type = "shapeless";
   164         -	recipe = {
   165         -		"farming:mixing_bowl";
   166         -		'sorcery:extract_rice',
   167         -		'sorcery:oil_berry',
   168         -	};
   169         -	output = 'sorcery:oil_fog';
   170         -	replacements = {
   171         -		{'farming:mixing_bowl', 'farming:mixing_bowl'};
   172         -		{ 'sorcery:extract_rice', 'vessels:glass_bottle' }
   173         -	};
   174         -}
   175         -]]
   176         -
   177     56   minetest.register_craft {
   178     57   	recipe = {
   179     58   		{"", "default:gold_ingot"},
   180     59   		{"default:bronze_ingot",""}
   181     60   	};
   182     61   	output = "sorcery:dagger";
   183     62   }
................................................................................
   186     65   
   187     66   -- infuser
   188     67   minetest.register_craftitem('sorcery:infuser_tube', {
   189     68   	inventory_image = 'sorcery_infuser_tube.png';
   190     69   	description = 'Infusion Tube';
   191     70   	groups = {
   192     71   		sorcery_magitech = 1; metal = 1;
           72  +		sorcery_tech_component = 1;
   193     73   	};
   194     74   })
   195     75   minetest.register_craft {
   196     76   	recipe = {
   197     77   		{"basic_materials:copper_strip",'sorcery:infuser_concentrator', "basic_materials:copper_strip"};
   198     78   		{"", "basic_materials:copper_strip", "basic_materials:gold_wire"};
   199     79   		{"", "basic_materials:copper_strip", ""};
................................................................................
   205     85   }
   206     86   
   207     87   minetest.register_craftitem('sorcery:infuser_chamber', {
   208     88   	inventory_image = 'sorcery_infuser_chamber.png';
   209     89   	description = 'Infusion Chamber';
   210     90   	groups = {
   211     91   		sorcery_magitech = 1;
           92  +		sorcery_tech_component = 1;
   212     93   	};
   213     94   })
   214     95   minetest.register_craft {
   215     96   	recipe = {
   216     97   		{'default:clay_brick','sorcery:grease_sealant','default:clay_brick'};
   217     98   		{'default:clay_brick','stairs:slab_steelblock','default:clay_brick'};
   218     99   	};
................................................................................
   223    104   }
   224    105   
   225    106   minetest.register_craftitem('sorcery:infuser_concentrator', {
   226    107   	inventory_image = 'sorcery_infuser_concentrator.png';
   227    108   	description = 'Infusion Concentrator';
   228    109   	groups = {
   229    110   		sorcery_magitech = 1;
          111  +		sorcery_tech_component = 1;
   230    112   	};
   231    113   })
   232    114   
   233    115   minetest.register_craft {
   234    116   	recipe = {
   235    117   		{'basic_materials:steel_wire'};
   236    118   		{'default:obsidian_shard'};
................................................................................
   391    273   	output = 'sorcery:gravitator_off';
   392    274   	recipe = {
   393    275   		{'sorcery:platinum_ingot','basic_materials:plastic_sheet','sorcery:platinum_ingot'};
   394    276   		{'xpanes:pane_flat','sorcery:gravity_manipulator','basic_materials:plastic_sheet'};
   395    277   		{'sorcery:platinum_ingot','basic_materials:plastic_sheet','sorcery:platinum_ingot'};
   396    278   	};
   397    279   }
          280  +
          281  +minetest.register_craft {
          282  +	output = 'sorcery:powder_firestorm 4';
          283  +	type = 'shapeless';
          284  +	recipe = {
          285  +		'sorcery:powder_lithium', 'sorcery:powder_lithium';
          286  +		'sorcery:powder_silver';
          287  +		'basic_materials:oil_extract';
          288  +		'sorcery:flame_oil';
          289  +		'tnt:gunpowder';
          290  +		'farming:mixing_bowl';
          291  +	};
          292  +	replacements = {
          293  +		{'sorcery:flame_oil', 'xdecor:bowl'};
          294  +		{'farming:mixing_bowl', 'farming:mixing_bowl'};
          295  +	};
          296  +}
          297  +
          298  +for _,e in pairs{'flame','frost','force'} do
          299  +	minetest.register_craftitem('sorcery:essence_'..e, {
          300  +		description = sorcery.lib.str.capitalize(e) .. ' Essence';
          301  +		inventory_image = 'sorcery_essence_'..e..'.png';
          302  +		group = { sorcery_elemental_essence = 1 };
          303  +	})
          304  +end
          305  +
          306  +minetest.register_craftitem('sorcery:inferno_crystal', {
          307  +	-- made with melding wand from ruby, lithium ingot, and gunpowder
          308  +	-- under sign of the wyvern or the winged serpent
          309  +	inventory_image = 'sorcery_inferno_crystal.png';
          310  +	description = 'Inferno Crystal';
          311  +})
          312  +
          313  +minetest.register_craftitem('sorcery:powder_firestorm', {
          314  +	inventory_image = 'sorcery_powder_firestorm.png';
          315  +	description = 'Firestorm Powder';
          316  +})
          317  +
          318  +minetest.register_craft {
          319  +	type = 'fuel', burntime = 8 * 15;
          320  +	recipe = 'sorcery:powder_firestorm';
          321  +};
          322  +
          323  +minetest.register_craft {
          324  +	type = 'fuel', burntime = 8 * 85;
          325  +	recipe = 'sorcery:inferno_crystal';
          326  +	replacement = {{'sorcery:inferno_crystal', 'sorcery:shard_ruby 6'}};
          327  +};
          328  +
          329  +minetest.register_craftitem('sorcery:essence_flame', {
          330  +	inventory_image = 'sorcery_essence_flame.png';
          331  +	description = 'Flame Essence';
          332  +})
          333  +
   398    334   
   399    335   minetest.register_craftitem('sorcery:gravity_manipulator', {
   400    336   	description = 'Gravity Manipulator';
   401    337   	inventory_image = 'sorcery_gravity_manipulator.png';
   402    338   	groups = {
   403    339   		sorcery_magitech = 1;
          340  +		sorcery_tech_component = 1;
   404    341   	};
   405    342   })
   406    343   
   407    344   minetest.register_craftitem('sorcery:tuning_disc',{
   408    345   	description = 'Tuning Disc';
   409    346   	inventory_image = 'sorcery_tuning_disc.png';
   410    347   	groups = {
   411    348   		sorcery_magitech = 1; metal = 1;
          349  +		sorcery_tech_component = 1;
   412    350   	};
   413    351   });
   414    352   
   415    353   minetest.register_craftitem('sorcery:core_counterpraxic',{
   416    354   	description = 'Counterpraxis Core';
   417    355   	inventory_image = 'sorcery_core_counterpraxic.png';
   418    356   	groups = {
   419    357   		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
          358  +		sorcery_tech_component = 1;
   420    359   	};
   421    360   });
   422    361   
   423    362   minetest.register_craftitem('sorcery:core_mandatic',{
   424    363   	description = 'Mandatic Core';
   425    364   	inventory_image = 'sorcery_core_mandatic.png';
   426    365   	groups = {
   427    366   		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
          367  +		sorcery_tech_component = 1;
   428    368   	};
   429    369   });
   430    370   
   431    371   minetest.register_craftitem('sorcery:core_syncretic',{
   432    372   	description = 'Syncresis Core';
   433    373   	inventory_image = 'sorcery_core_syncretic.png';
   434    374   	groups = {
   435    375   		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
          376  +		sorcery_tech_component = 1;
   436    377   	};
   437    378   });
   438    379   
   439    380   minetest.register_craftitem('sorcery:suppression_matrix',{
   440    381   	description = 'Suppression Matrix';
   441    382   	inventory_image = 'sorcery_suppression_matrix.png';
   442    383   	groups = {
   443    384   		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
          385  +		sorcery_tech_component = 1;
   444    386   	};
   445    387   });
   446    388   
   447    389   minetest.register_craftitem('sorcery:inverter_coil',{
   448    390   	description = 'Inverter Coil';
   449    391   	inventory_image = 'sorcery_inverter_coil.png';
   450    392   	groups = {
   451    393   		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
          394  +		sorcery_tech_component = 1;
   452    395   	};
   453    396   });
   454    397   
   455    398   minetest.register_craftitem('sorcery:beam_generator',{
   456    399   	description = 'Beam Generator';
   457    400   	inventory_image = 'sorcery_beam_generator.png';
   458    401   	groups = {
   459    402   		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
          403  +		sorcery_tech_component = 1;
   460    404   	};
   461    405   });
   462    406   
   463    407   minetest.register_craftitem('sorcery:leyline_stabilizer',{
   464    408   	description = 'Leyline Stabilizer';
   465    409   	inventory_image = 'sorcery_leyline_stabilizer.png';
   466    410   	groups = {
   467    411   		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
          412  +		sorcery_tech_component = 1;
   468    413   	};
   469    414   });
   470    415   
   471    416   minetest.register_craftitem('sorcery:field_emitter',{
   472    417   	description = 'Field Emitter';
   473    418   	inventory_image = 'sorcery_field_emitter.png';
   474    419   	groups = {
   475    420   		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
          421  +		sorcery_tech_component = 1;
   476    422   	};
   477    423   })
          424  +
          425  +--- possible other components
          426  +-- felicitator
          427  +-- flux rectifier
          428  +-- flux suppressor
          429  +-- flux amplifier
          430  +-- tacit web
          431  +-- radiatic filament
          432  +-- radia transducer
          433  +-- transductive coil
          434  +-- affine macerator
          435  +-- state extender
          436  +-- state disruptor
          437  +-- axial dispulsor
          438  +-- aether coruscator
   478    439   
   479    440   minetest.register_craft {
   480    441   	output = 'sorcery:leyline_stabilizer';
   481    442   	recipe = {
   482    443   		{'basic_materials:copper_wire','group:sorcery_ley_cable','basic_materials:copper_wire'};
   483    444   		{'sorcery:grease_neutralizing','group:sorcery_ley_cable','sorcery:grease_neutralizing'};
   484    445   		{'basic_materials:copper_wire','group:sorcery_ley_cable','basic_materials:copper_wire'};
................................................................................
   690    651   		{'xpanes:pane_flat', 'basic_materials:copper_wire', 'xpanes:pane_flat'};
   691    652   	};
   692    653   	replacements = {
   693    654   		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
   694    655   	};
   695    656   	output = 'morelights:bulb 4';
   696    657   }
          658  +
          659  +local auxdyes = {
          660  +	[{'vidrium','iridium','vidrium'}]= 'violet';
          661  +	[{'iridium','vidrium','iridium'}]= 'mulberry';
          662  +	[{'cobalt','iridium','cobalt'}  ]= 'magenta';
          663  +	[{'iridium','cobalt','iridium'} ]= 'fuchsia';
          664  +	[{'iridium','gold','iridium'}   ]= 'rose';
          665  +	[{'iridium','copper','iridium'} ]= 'crimson';
          666  +	[{'aluminum','tin','aluminum'}  ]= 'pink';
          667  +	[{'copper','gold','copper'}     ]= 'orange';
          668  +	[{'bronze','gold','bronze'}     ]= 'amber';
          669  +	[{'bronze','copper','bronze'}   ]= 'brown';
          670  +	[{'vidrium','gold','vidrium'}   ]= 'lime';
          671  +	[{'vidrium','cobalt','vidrium'} ]= 'cerulean';
          672  +	[{'vidrium','cobalt','levitanium'}] = 'azure';
          673  +}
          674  +
          675  +for metals,color in pairs(auxdyes) do
          676  +	local dye = 'dye:' .. color
          677  +	if minetest.registered_items[dye] then
          678  +		local pd = {} for i=1,3 do
          679  +			pd[i] = sorcery.data.metals[metals[i]].parts.powder
          680  +		end
          681  +		minetest.register_craft {
          682  +			output = dye .. ' 4';
          683  +			recipe = {
          684  +				{'',    pd[2],                     ''};
          685  +				{pd[1],'basic_materials:paraffin', pd[3]};
          686  +				{'',   'bucket:bucket_water',      ''};
          687  +			};
          688  +		}
          689  +	end
          690  +end
   697    691   
   698    692   local potion_auto_recipe = function(id, substance, tools, container)
   699    693   	local recipe = tools
   700    694   	local replace = {}
   701    695   	local batches = 1
   702    696   	for _,v in pairs(tools) do
   703    697   		replace[#replace + 1] = {v,v}