sorcery  Diff

Differences From Artifact [324c6534ec]:

  • File writing.lua — part of check-in [72eebac4bc] at 2020-09-26 18:49:51 on branch trunk — add writing stand for editing codexes; add scissors, ink, erasure fluid, pens; touch up codex UI; add many recipe notes; add craft divination type for crafttools; defuckulate fucktarded crafttool impl; enhance table library with missing features like lua's table.unpack; many bug fixes and enhancements; blood for the blood god (user: lexi, size: 16181) [annotate] [blame] [check-ins using]

To Artifact [9b17325152]:

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

    27     27   	}
    28     28   end
    29     29   
    30     30   paperburn('default:paper',1) paperburn('sorcery:recipe',1)
    31     31   paperburn('default:book',3) paperburn('sorcery:cookbook',3)
    32     32   paperburn('default:book_written',3)
    33     33   
    34         -minetest.register_craft {
    35         -	type = "shapeless";
    36         -	recipe = {"default:book_written", "bucket:bucket_water"};
    37         -	output = "default:book";
    38         -	replacements = {
    39         -		{"bucket:bucket_water", "bucket:bucket_empty"}
    40         -	}
    41         -}
           34  +-- minetest.register_craft {
           35  +-- 	type = "shapeless";
           36  +-- 	recipe = {
           37  +-- 		"default:book_written";
           38  +-- 		"bucket:bucket_water", 'sorcery:erasure_fluid';
           39  +-- 	};
           40  +-- 	output = "default:book";
           41  +-- 	replacements = {
           42  +-- 		{"bucket:bucket_water", "bucket:bucket_empty"};
           43  +-- 		{'sorcery:erasure_fluid', 'vessels:glass_bottle'};
           44  +-- 	}
           45  +-- }
    42     46   
    43     47   minetest.register_craft {
    44     48   	type = 'shapeless';
    45     49   	recipe = {"default:book_written", "dye:black"};
    46     50   	output = 'default:book_written';
    47     51   }
    48     52   
................................................................................
   104    108   					{metal.parts.fragment,''};
   105    109   				};
   106    110   			}
   107    111   		end
   108    112   	end
   109    113   end
   110    114   
   111         -for _,name in pairs {
   112         -	'bronze', 'steel', 'aluminum', 'tungsten', 'iridium'
   113         -} do -- :/
   114         -	local metal = sorcery.data.metals[name]
          115  +sorcery.register.metals.foreach('sorcery:mkscissors',{'sorcery:generate'},function(name,metal)
          116  +	local oklist = { -- :/
          117  +		bronze=true, steel=true, aluminum=true;
          118  +		tungsten=true, iridium=true
          119  +	} -- TODO: moar art
          120  +	if not oklist[name] then return end
          121  +
   115    122   	local id = 'sorcery:scissors_' .. name
   116    123   	minetest.register_tool(id, {
   117    124   		description = sorcery.lib.str.capitalize(name) .. ' Scissors';
   118    125   		inventory_image = 'sorcery_scissors_' .. name .. '.png';
   119    126   		groups = { crafttool = metal.hardness * 15; scissors = 1 };
   120    127   		tool_capabilities = {
   121    128   			full_punch_interval = 1.5;
................................................................................
   133    140   				};
   134    141   			};
   135    142   			damage_groups = { fleshy = 1; };
   136    143   		};
   137    144   		_sorcery = {
   138    145   			material = {
   139    146   				metal = true, data = metal, name = name;
   140         -				grindvalue = 3;
          147  +				grindvalue = 4;
   141    148   			};
   142    149   			recipe = {
   143    150   				note = "An editor's best friend";
   144    151   			};
   145    152   		};
   146    153   	})
   147    154   	local frag = metal.parts.fragment;
   148    155   	local screw = metal.parts.screw;
   149         -	local ingot = metal.parts.ingot;
   150    156   	minetest.register_craft {
   151    157   		output = id;
   152    158   		recipe = {
   153    159   			{frag,'screwdriver:screwdriver',frag};
   154    160   			{'basic_materials:plastic_strip',screw,'basic_materials:plastic_strip'};
   155         -			{ingot,'',ingot};
          161  +			{frag,'',frag};
   156    162   		};
   157    163   		replacements = {
   158    164   			{'screwdriver:screwdriver', 'screwdriver:screwdriver'};
   159    165   		};
   160    166   	}
   161         -end
          167  +end)
          168  +
          169  +sorcery.register.metals.foreach('create cutting recipes',{'sorcery:mkscissors'}, function(name,metal)
          170  +	local sc = 'sorcery:scissors_' .. name
          171  +	local mkcut = function(item,out)
          172  +		minetest.register_craft {
          173  +			output = out, type = 'shapeless';
          174  +			recipe = {item,sc}, replacements = {{sc,sc}};
          175  +		}
          176  +	end
          177  +	if minetest.registered_items[sc] then
          178  +		mkcut('default:paper','sorcery:punchcard_blank 2')
          179  +		mkcut('default:book','default:paper 3')
          180  +	end
          181  +end)
   162    182   
   163    183   -- the writing stand node allows books to be modified
   164    184   -- in more complex ways than just inserting pages
   165    185   
   166    186   local ws_props = function(pos)
   167    187   	local meta = minetest.get_meta(pos)
   168    188   	local inv = meta:get_inventory()
................................................................................
   325    345   local wsbox = {
   326    346   	type = 'fixed';
   327    347   	fixed = {
   328    348   		-0.5, -0.5, -0.43;
   329    349   		 0.5,  0.05, 0.43;
   330    350   	};
   331    351   }
          352  +
          353  +minetest.register_craftitem('sorcery:pulp', {
          354  +	description = 'Pulp';
          355  +	inventory_image = 'sorcery_pulp.png';
          356  +	group = {flammable = 1};
          357  +})
          358  +minetest.register_craftitem('sorcery:pulp_inky', {
          359  +	description = 'Inky Pulp';
          360  +	inventory_image = 'sorcery_pulp_inky.png';
          361  +	group = {flammable = 1};
          362  +})
          363  +minetest.register_craft {
          364  +	output = 'sorcery:pulp 6';
          365  +	type = 'shapeless';
          366  +	recipe = {
          367  +		'bucket:bucket_water', 'sorcery:erasure_fluid';
          368  +		'sorcery:pulp_inky'; 'sorcery:pulp_inky'; 'sorcery:pulp_inky';
          369  +		'sorcery:pulp_inky'; 'sorcery:pulp_inky'; 'sorcery:pulp_inky';
          370  +	};
          371  +	replacements = {
          372  +		{'sorcery:erasure_fluid', 'vessels:glass_bottle'};
          373  +		{'bucket:bucket_water', 'bucket:bucket_empty'};
          374  +	};
          375  +}
          376  +minetest.register_craft {
          377  +	output = 'sorcery:punchcard_blank';
          378  +	type = 'cooking';
          379  +	recipe = 'sorcery:pulp';
          380  +	cooktime = 6;
          381  +}
          382  +minetest.register_craftitem('sorcery:pulp_sheet', {
          383  +	description = 'Pulp Sheet';
          384  +	inventory_image = 'sorcery_pulp_sheet.png';
          385  +	groups = {flammable = 1};
          386  +})
          387  +minetest.register_craft {
          388  +	output = 'default:paper';
          389  +	type = 'cooking';
          390  +	recipe = 'sorcery:pulp_sheet';
          391  +	cooktime = 8;
          392  +}
          393  +minetest.register_craft {
          394  +	output = 'sorcery:pulp_sheet 2';
          395  +	recipe = {
          396  +		{'sorcery:pulp', 'sorcery:pulp'};
          397  +		{'sorcery:pulp', 'sorcery:pulp'};
          398  +	};
          399  +}
   332    400   
   333    401   minetest.register_node('sorcery:writing_stand', {
   334    402   	description = 'Writing Stand';
   335    403   	drawtype = 'mesh';
   336    404   	mesh = 'sorcery-writing-stand.obj';
   337    405   	sunlight_propagates = true;
   338    406   	paramtype = 'light';