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
81
82
83
84
85
86





87
88
89
90
91
92
93
..
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
...
140
141
142
143
144
145
146










147
148
149
150



151
152
153
154
155
156
157
	sorcery.data.metallookup[fragment] = {
		id = name; data = metal;
		value = 1;
	}
	minetest.register_craftitem(screw, {
		description = sorcery.lib.str.capitalize(name) .. ' Screw';
		inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render();





		_sorcery = {
			material = {
				id = name, data = metal;
				grindcost = 2, grindvalue = 1;
				value = 0.5;
			};
		};
................................................................................
	})
	if metal.dye then
		minetest.register_craft {
			output = 'dye:' .. metal.dye .. ' 4';
			recipe = {
				{'',     powder,                   ''};
				{powder,'basic_materials:paraffin',powder};
				{'','bucket:bucket_water',''};
			};
			replacements = {
				{'bucket:bucket_water', 'bucket:bucket_empty'};
			};
		};
	end
	-- TODO: replace crafting recipe with kiln recipe
................................................................................
			level = math.ceil(((metal.hardness/8) * 3)) + 1;
			ingot_image = (metal.image and metal.image.ingot) or nil;
			ore_image = 'default_stone.png^sorcery_' .. name .. '_ore.png';
			lump_image = (metal.image and metal.image.lump) or nil;
			armor_weight = metal.armor_weight;
			armor_protection = metal.armor_protection;
		}










	end
	minetest.register_craftitem(fragment, {
		inventory_image = 'sorcery_' .. name .. '_fragment.png';
		description = sorcery.lib.str.capitalize(name) .. ' Fragment';



		_sorcery = {
			recipe = {
				canonical = {
					cook = {{ingot}};
				};
			};
		};







>
>
>
>
>







 







|







 







>
>
>
>
>
>
>
>
>
>




>
>
>







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