sorcery  Check-in [72eebac4bc]

Overview
Comment: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
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 72eebac4bc5efbd10e1defef57906dd3ce87fae6ccd11f3f30f13ec1b02df248
User & Date: lexi on 2020-09-26 18:49:51
Other Links: manifest | tags
Context
2020-09-29
12:40
* 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 check-in: 3f6a913e4e user: lexi tags: trunk
2020-09-26
18:49
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 check-in: 72eebac4bc user: lexi tags: trunk
2020-09-24
23:07
add blood god, add gravitator, add hand-drawn ore images, add mana hud display for enchanted items, various tweaks and enhancements check-in: f165d9e39f user: lexi tags: trunk
Changes

Modified cookbook.lua from [89adffa44b] to [f535fa81e6].

31
32
33
34
35
36
37

38
39
40
41
42
43
44
..
82
83
84
85
86
87
88
89

90
91
92
93
94
95
96
...
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
...
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
...
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
...
468
469
470
471
472
473
474













475
476
477
478
479
480
481
...
483
484
485
486
487
488
489





















490
491
492
493
494
495
496
...
498
499
500
501
502
503
504
505


506
507

508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
		vessel = { caption = 'Any Bottle', cnitem = 'vessels:glass_bottle' };
		flower = { caption = 'Any Flower', cnitem = 'flowers:rose' };
		mushroom = { caption = 'Any Mushroom', cnitem = 'flowers:mushroom_brown' };
		water_bucket = { caption = 'Water Bucket', cnitem = 'bucket:bucket_water' };
		sorcery_ley_cable = { caption = 'Cable', cnitem = 'sorcery:cable_vidrium' };
	};
}


local slot3x3 = {
	{0,0}, {1,0}, {2,0};
	{0,1}, {1,1}, {2,1};
	{0,2}, {1,2}, {2,2};
}
local props_builtin = function(item)
................................................................................
	return names[math.random(#names)]
end end
local find_builtin = function(out)
	local rec = {}
	local i = minetest.get_craft_recipe(out)
	if i == nil or i.items == nil or #i.items == 0 then return nil end
	local w = (i.width == 0) and 3 or i.width
	for j=1,#i.items do

		local row = math.floor((j-1) / w)
		local col = (j-1) % w
		if i.items[j] then
			rec[1 + (row * 3) + col] = i.items[j]
		end
	end
	return rec
................................................................................
		end
	end;
}
sorcery.cookbook.classes = {
	craft = {
		name = 'Crafting Guide';
		node = 'xdecor:workbench';
		booksuf = 'Manual';
		w = 3, h = 3;
		chance = 2;
		slots = slot3x3;
		pick = pick_builtin('normal');
		find = find_builtin;
		desc = desc_builtin;
		props = props_builtin;
		apply_exclusions = true;
	};
	-- smelt = {
	-- 	w = 3, h = 3;
	-- 	slots = slot3x3;
	-- };
................................................................................
		w = 1, h = 2;
		pick = function(restrict)
			cache:populate_grindables()
			local i = cache.grindables[math.random(#cache.grindables)]
			local pd = sorcery.itemclass.get(i, 'grindable')
			return pd.powder
		end;
		desc = desc_builtin;
		props = props_builtin;
		slots = {
			{0,1},
			{0,0};
		};
		find = function(out)
			cache:populate_grindables()
................................................................................
		end
	end
	local img, ot
	local props = k.props(result)
	if props.note then
		local nx, ny, nw, nh
		if notes_right then
			nx = 5 ny = 0
			nw = 3 nh = 3
		else
			nx = 0 ny = 3
			nw = 4 nh = 1
		end
		t = t .. string.format([[
			textarea[%f,%f;%f,%f;;;%s]
		]], nx,ny,nw,nh, minetest.formspec_escape(props.note))
	end
	if k.icon then img = k.icon(result) end
	if k.outdesc then ot = k.outdesc(result) else ot = desc_builtin(result) end
		-- image[%f,%f;1,1;gui_furnace_arrow_bg.png^[transformR270]
	return t .. string.format([[
		item_image[%f,%f;1,1;%s]tooltip[%f,%f;1,1;%s]
................................................................................
	type = 'shapeless';
	recipe = {
		'sorcery:cookbook';
		'default:book';
	};
	output = 'sorcery:cookbook';
};














local m = sorcery.lib.marshal
local encbook, decbook = m.transcoder {
	pages = m.g.array(8, m.g.struct {
		kind = m.t.str;
		name = m.t.str;
	})
................................................................................

local bookprops = function(stack)
	local meta = stack:get_meta()
	if meta:contains('cookbook') then
		return decbook(sorcery.lib.str.meta_dearmor(meta:get_string('cookbook'),true))
	else return {pages={}} end
end






















local bookform_ctx = {}
local bookform = function(stack,user)
	bookform_ctx[user:get_player_name()] = user:get_wield_index()

	local meta = stack:get_meta()
	local book = bookprops(stack)
................................................................................
	local curpage = meta:contains("pagenr") and meta:get_int("pagenr") or 1

	local pgofs = (curpage - 1) * constants.recipes_per_cookbook_page
	local form = string.format([[
		formspec_version[3] 
		size[10,12]real_coordinates[true]
		box[0,0;10,1;#580C39FF]label[0.4,0.5;%s]
		button_exit[3,11;4,1;quit;Page %u/%u]


	]], minetest.formspec_escape(meta:get_string('description')),
	    curpage, pagect)

	
	if curpage > 1      then form = form .. 'button[0,11;3,1;pageback;< Back]' end
	if curpage < pagect then form = form .. 'button[7,11;3,1;pagenext;Next >]' end

	local coords = {
		{2,1.3};
		{2,4.5};
		{2,7.7};
		-- {0,1.3}, {4, 1.3};
		-- {0,4.7}, {4, 4.7};
		-- {0,8.1}, {4, 8.1};
	}
	for i=pgofs,(pgofs + constants.recipes_per_cookbook_page-1) do
		local maxw, maxh = 3, 2
		if not book.pages[i+1] then break end







>







 







|
>







 







|





<







 







<







 







|
|





|







 







>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
>
>


>





|
|
|







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
..
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
...
159
160
161
162
163
164
165
166
167
168
169
170
171

172
173
174
175
176
177
178
...
235
236
237
238
239
240
241

242
243
244
245
246
247
248
...
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
...
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
...
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
...
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
		vessel = { caption = 'Any Bottle', cnitem = 'vessels:glass_bottle' };
		flower = { caption = 'Any Flower', cnitem = 'flowers:rose' };
		mushroom = { caption = 'Any Mushroom', cnitem = 'flowers:mushroom_brown' };
		water_bucket = { caption = 'Water Bucket', cnitem = 'bucket:bucket_water' };
		sorcery_ley_cable = { caption = 'Cable', cnitem = 'sorcery:cable_vidrium' };
	};
}
sorcery.cookbook.constants = constants

local slot3x3 = {
	{0,0}, {1,0}, {2,0};
	{0,1}, {1,1}, {2,1};
	{0,2}, {1,2}, {2,2};
}
local props_builtin = function(item)
................................................................................
	return names[math.random(#names)]
end end
local find_builtin = function(out)
	local rec = {}
	local i = minetest.get_craft_recipe(out)
	if i == nil or i.items == nil or #i.items == 0 then return nil end
	local w = (i.width == 0) and 3 or i.width
	-- for j=1,#i.items do
	for j,item in pairs(i.items) do
		local row = math.floor((j-1) / w)
		local col = (j-1) % w
		if i.items[j] then
			rec[1 + (row * 3) + col] = i.items[j]
		end
	end
	return rec
................................................................................
		end
	end;
}
sorcery.cookbook.classes = {
	craft = {
		name = 'Crafting Guide';
		node = 'xdecor:workbench';
		booksuf = 'Codex';
		w = 3, h = 3;
		chance = 2;
		slots = slot3x3;
		pick = pick_builtin('normal');
		find = find_builtin;

		props = props_builtin;
		apply_exclusions = true;
	};
	-- smelt = {
	-- 	w = 3, h = 3;
	-- 	slots = slot3x3;
	-- };
................................................................................
		w = 1, h = 2;
		pick = function(restrict)
			cache:populate_grindables()
			local i = cache.grindables[math.random(#cache.grindables)]
			local pd = sorcery.itemclass.get(i, 'grindable')
			return pd.powder
		end;

		props = props_builtin;
		slots = {
			{0,1},
			{0,0};
		};
		find = function(out)
			cache:populate_grindables()
................................................................................
		end
	end
	local img, ot
	local props = k.props(result)
	if props.note then
		local nx, ny, nw, nh
		if notes_right then
			nx = 5.25 ny = 0
			nw = 4 nh = 3
		else
			nx = 0 ny = 3
			nw = 4 nh = 1
		end
		t = t .. string.format([[
			hypertext[%f,%f;%f,%f;note;<global valign=middle halign=justify size=20>%s]
		]], nx,ny,nw,nh, minetest.formspec_escape(props.note))
	end
	if k.icon then img = k.icon(result) end
	if k.outdesc then ot = k.outdesc(result) else ot = desc_builtin(result) end
		-- image[%f,%f;1,1;gui_furnace_arrow_bg.png^[transformR270]
	return t .. string.format([[
		item_image[%f,%f;1,1;%s]tooltip[%f,%f;1,1;%s]
................................................................................
	type = 'shapeless';
	recipe = {
		'sorcery:cookbook';
		'default:book';
	};
	output = 'sorcery:cookbook';
};

-- erase cookbooks in the usual way
minetest.register_craft {
	type = 'shapeless';
	recipe = {
		'sorcery:cookbook';
		'bucket:bucket_water';
	};
	output = 'default:book';
	replacements = {
		{'bucket:bucket_water','bucket:bucket_empty'};
	};
};

local m = sorcery.lib.marshal
local encbook, decbook = m.transcoder {
	pages = m.g.array(8, m.g.struct {
		kind = m.t.str;
		name = m.t.str;
	})
................................................................................

local bookprops = function(stack)
	local meta = stack:get_meta()
	if meta:contains('cookbook') then
		return decbook(sorcery.lib.str.meta_dearmor(meta:get_string('cookbook'),true))
	else return {pages={}} end
end

sorcery.cookbook.get = bookprops
sorcery.cookbook.set = function(stack,props)
	local meta = stack:get_meta()
	meta:set_string('cookbook', sorcery.lib.str.meta_armor(encbook(props),true))
end

sorcery.cookbook.defaults = {
	indesc = desc_builtin;
	outdesc = desc_builtin;
	title = desc_builtin;
	props = props_builtin;
	pick = pick_builtin;
	find = find_builtin;
}

sorcery.cookbook.recfn = function(class,fn)
	local c = sorcery.cookbook.classes[class]
	if c[fn] then return c[fn] end
	return sorcery.cookbook.defaults[fn]
end

local bookform_ctx = {}
local bookform = function(stack,user)
	bookform_ctx[user:get_player_name()] = user:get_wield_index()

	local meta = stack:get_meta()
	local book = bookprops(stack)
................................................................................
	local curpage = meta:contains("pagenr") and meta:get_int("pagenr") or 1

	local pgofs = (curpage - 1) * constants.recipes_per_cookbook_page
	local form = string.format([[
		formspec_version[3] 
		size[10,12]real_coordinates[true]
		box[0,0;10,1;#580C39FF]label[0.4,0.5;%s]
		style[pgind;border=false]
		style[pgind:hovered;content_offset=0,0]
		button[3,11;4,1;pgind;Page %u/%u]
	]], minetest.formspec_escape(meta:get_string('description')),
	    curpage, pagect)
		-- using an extremely dishonorable trick to fake centered text
	
	if curpage > 1      then form = form .. 'button[0,11;3,1;pageback;< Back]' end
	if curpage < pagect then form = form .. 'button[7,11;3,1;pagenext;Next >]' end

	local coords = {
		{0.85,1.3};
		{0.85,4.5};
		{0.85,7.7};
		-- {0,1.3}, {4, 1.3};
		-- {0,4.7}, {4, 4.7};
		-- {0,8.1}, {4, 8.1};
	}
	for i=pgofs,(pgofs + constants.recipes_per_cookbook_page-1) do
		local maxw, maxh = 3, 2
		if not book.pages[i+1] then break end

Modified crafttools.lua from [569141ccf4] to [68741b438c].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

22

23
24
25
26




27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
minetest.register_on_craft(function(stack,crafter,recipe,grid)
	local ctoolclass = {
		[1] = 200;
		[2] = 100;
		[3] = 50;
		[4] = 10;
		[5] = 5;
	}
	for i=1,grid:get_size('craft') do
		local s = grid:get_stack('craft',i)
		local v = minetest.get_item_group(s:get_name(),'crafttool')
		if v ~= 0 then
			local dmg = 65536 / ctoolclass[v]
			local tool = recipe[i] 
			tool:add_wear(dmg)
			grid:set_stack('craft',i,tool)
		end
	end
	return nil
end)


if minetest.get_modpath('xdecor') then

	local og = minetest.registered_tools['xdecor:hammer'].groups
	og.crafttool = 2
	minetest.override_item('xdecor:hammer', {groups = og})
end





minetest.register_tool('sorcery:vice', {
	description = 'Vice';
	inventory_image = 'sorcery_vice.png';
	group = { crafttool = 3; }
})
minetest.register_craft {
	output = 'sorcery:vice';
	recipe = {
		{'default:steel_ingot','sorcery:screw_steel','default:steel_ingot'};
		{'default:bronze_ingot','sorcery:screw_steel','default:bronze_ingot'};
		{'default:tin_ingot','default:tin_ingot','default:tin_ingot'};
	};
}
-- chisel

<
<
<
<
<
<
<




|








>
|
>
|
|
|
|
>
>
>
>




|










1







2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
minetest.register_on_craft(function(stack,crafter,recipe,grid)







	for i=1,grid:get_size('craft') do
		local s = grid:get_stack('craft',i)
		local v = minetest.get_item_group(s:get_name(),'crafttool')
		if v ~= 0 then
			local dmg = 65536 / v
			local tool = recipe[i] 
			tool:add_wear(dmg)
			grid:set_stack('craft',i,tool)
		end
	end
	return nil
end)

local mod_override = function(mod,name,val)
	if minetest.get_modpath(mod) then
		local id = mod..':'..name
		local og = minetest.registered_tools[id].groups
		og.crafttool = val
		minetest.override_item(id, {groups = og})
	end
end

mod_override('xdecor',     'hammer',     70)
mod_override('screwdriver','screwdriver',40)

minetest.register_tool('sorcery:vice', {
	description = 'Vice';
	inventory_image = 'sorcery_vice.png';
	group = { crafttool = 100; }
})
minetest.register_craft {
	output = 'sorcery:vice';
	recipe = {
		{'default:steel_ingot','sorcery:screw_steel','default:steel_ingot'};
		{'default:bronze_ingot','sorcery:screw_steel','default:bronze_ingot'};
		{'default:tin_ingot','default:tin_ingot','default:tin_ingot'};
	};
}
-- chisel

Modified data/gods.lua from [7a41dba628] to [90d2603045].

139
140
141
142
143
144
145

146
147
148
149
150
151
152
153
		idol = {
			desc = "Blood Idol";
			width = 0.7;
			height = 1.3;
			tex = {
				"default_obsidian.png";
				"default_gold_block.png";

				"default_bronze_block.png^[multiply:#C32F2F";
				"default_bronze_block.png";
				"default_tin_block.png";
			};
		};
		sacrifice = {
			["sorcery:blood"] = 3;
			["bonemeal:bone"] = 9;







>
|







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
		idol = {
			desc = "Blood Idol";
			width = 0.7;
			height = 1.3;
			tex = {
				"default_obsidian.png";
				"default_gold_block.png";
				"default_copper_block.png";
				-- "default_bronze_block.png^[multiply:#C32F2F";
				"default_bronze_block.png";
				"default_tin_block.png";
			};
		};
		sacrifice = {
			["sorcery:blood"] = 3;
			["bonemeal:bone"] = 9;

Modified data/metals.lua from [3567f41644] to [970d414eec].

19
20
21
22
23
24
25

26
27
28
29
30
31
32
33
34

35
36
37
38
39
40
41

42
43
44
45
46
47
48
..
50
51
52
53
54
55
56

57


58
59
60
61
62
63
64
..
67
68
69
70
71
72
73

74


75
76
77
78
79
80
81
..
82
83
84
85
86
87
88


89
90
91
92
93
94
95
96
97
98

99
100
101
102
103
104
105
106
107
108
109
110

111
112
113
114
115
116
117
...
118
119
120
121
122
123
124

125
126
127
128
129
130
131
132
133
134
135

136
137
138
139
140
141
142
143
144

145
146
147
148
149
150
151
...
158
159
160
161
162
163
164


165
166
167
168
169
170
171
...
174
175
176
177
178
179
180

181
182
183
184
185
186
187
...
188
189
190
191
192
193
194

195
196
197
198
199
200
201
202
203
204
205
206
207

208
209
210
211
212
213
214
...
220
221
222
223
224
225
226

227
228
229
230
231
232
233
...
241
242
243
244
245
246
247

248
249
250
251
252
253
254
...
264
265
266
267
268
269
270


271
272
273
274
275
276
277
...
287
288
289
290
291
292
293

294
295
296
297
298
299
300
...
315
316
317
318
319
320
321

322
323
324
325
326
327
328
...
337
338
339
340
341
342
343

344
345
346
347
348
349
350
...
358
359
360
361
362
363
364


365
366
367
return {
	tin = {
		ingot = 'default:tin_ingot';
		block = 'default:tinblock';
		tone = {172,172,172};
		no_tools = true; no_armor = true; grindhead = true;
		hardness = 2;

	};
	copper = {
		dye = 'orange';
		ingot = 'default:copper_ingot';
		block = 'default:copperblock';
		tone = {255,176,61};
		no_tools = true; no_armor = true;
		hardness = 2;
		conduct = 0.3;

	};
	brass = {
		tone = {255,226,87};
		dye = 'bright_orange';
		artificial = true;
		no_tools = true; no_armor = true;
		hardness = 3;

		mix = {
			metals = {
				silver = 1;
				copper = 4;
			};
		};
	};
................................................................................
		ingot = 'default:bronze_ingot';
		block = 'default:bronzeblock';
		dye = 'dark_orange';
		artificial = true;
		tone = {229,115,52};
		items = default_items('bronze');
		hardness = 4;

		maxenergy = 150;


		slots = {
			{affinity = {'counterpraxic'}; confluence = 0.7};
		};
		mix = {
			metals = {
				copper = 4;
				tin = 1;
................................................................................
	};
	steel = {
		ingot = 'default:steel_ingot';
		block = 'default:steelblock';
		tone = {240,240,240};
		items = default_items('steel');
		maxenergy = 200;

		hardness = 5;


		slots = {
			{affinity = {'praxic'}; confluence = 0.5};
		};
	};
	aluminum = {
		tone = {196,64,32}, alpha = 128;
		dye = 'red';
................................................................................
		meltpoint = 1;
		rarity = 12; depth = 158;
		power = 3; speed = 2.4;
		durability = 700; cooktime = 25;
		hardness = 6;
		armor_weight = 0.3;
		maxenergy = 400;


		slots = {
			{affinity = {'syncretic'}; confluence = 0.7};
			{affinity = {'praxic'}; confluence = 0.4};
		};
	};
	levitanium = {
		tone = {17,255,191}, alpha = 40;
		dye = 'bright_blue';
		meltpoint = 4;
		hardness = 3;

		rarity = 17; depth = 870;
		power = 1; durability = 50; cooktime = 70;
		armor_weight = -2.2; armor_protection = 1;
		maxenergy = 5000;
		no_tools = true;
	};
	platinum = {
		tone = {255,233,118}, alpha = 50;
		meltpoint = 1;
		rarity = 15; depth = 580;
		power = 4; speed = 3;
		hardness = 6;

		durability = 1400; cooktime = 40;
		armor_weight = 0.7;
		maxenergy = 1000;
		slots = {
			{affinity = {'praxic','counterpraxic'}; confluence = 0.3};
			{affinity = {'counterpraxic'}; confluence = 0.8};
		}
................................................................................
	};
	gold = {
		dye = 'yellow';
		ingot = 'default:gold_ingot';
		block = 'default:goldblock';
		tone = {255,225,47};
		hardness = 1;

		maxenergy = 3000;
		slots = {
			{affinity = {'praxic','counterpraxic'}; confluence = 1.4};
			{affinity = {'praxic','counterpraxic'}; confluence = 1.2};
		}
	};
	silver = {
		tone = {218,255,246};
		dye = 'white';
		maxenergy = 2000;
		hardness = 1;

		depth = 380; rarity = 13.5;
		no_armor = true; no_tools = true;
		power = 1; cooktime = 8; hardness = 1;
	};
	electrum = {
		tone = {212, 255, 0}, alpha = 80;
		artificial = true;
		hardness = 1;
		conduct = 2;

		dye = 'bright_green';
		mix = {
			metals = {
				silver = 1;
				gold = 1;
			};
		};
................................................................................
		speed = 2.8;
		power = 4;
		hardness = 8;
		meltpoint = 4;
		cooktime = 100;
		durability = 2700;
		maxenergy = 1500;


		slots = {
			{affinity = {'counterpraxic'}, confluence = 0.6};
			{affinity = {'praxic','counterpraxic'}, confluence = 1};
			{affinity = {'praxic'}, confluence = 0.5};
		};
	};
	cobalt = {
................................................................................
		rarity = 17;
		durabilty = 900;
		hardness = 6;
		power = 3;
		speed = 3.5;
		cooktime = 30;
		maxenergy = 3500;

		slots = {
			{
				affinity = {'counterpraxic'};
				confluence = 0.65;
				interference = {speed = 1};
			};
		}
................................................................................
	};
	lithium = {
		tone = {255,252,93}, alpha = 80;
		dye = 'yellow';
		rarity = 13;
		hardness = 2;
		fuel = 80;

		no_tools = true;
		no_armor = true;
	};
	vidrium = {
		tone = {119,185,221}, alpha = 140;
		artificial = true;
		dye = 'cyan';
		hardness = 1;
		durability = 300;
		meltpoint = 2;
		cooktime = 20;
		no_tools = true, no_armor = true;
		conduct = 5;

		mix = {
			metals = {
				lithium = 2;
				tin = 4;
				gold = 1;
			}
		};
................................................................................
	iridium = {
		tone = {209,88,241}, alpha = 80;
		dye = 'purple';
		rarity = 18;
		meltpoint = 3;
		cooktime = 340;
		hardness = 7;

		maxenergy = 1800;
		conduct = 10;
		durability = 1900;
		speed = 3;
		img = {
			-- ingot = 'sorcery_iridium_ingot.png';
			-- block = 'sorcery_iridium_block.png';
................................................................................
		tone = {255,64,175}, alpha = 70;
		cooktime = 120;
		artificial = true;
		durability = 3400;
		speed = 3.1;
		hardness = 9;
		power = 5;

		mix = {
			metals = {
				platinum = 4;
				aluminum = 4;
				tin = 1;
			};
		};
................................................................................
	impervium = {
		tone = {226,255,107}, alpha = 90;
		cooktime = 260;
		meltpoint = 5;
		artificial = true;
		speed = 2.1;
		hardness = 15;


		durability = 5300;
		maxenergy = 2300;
		watercool = true;
		mix = {
			metals = {
				duranium = 4;
				iridium = 2;
................................................................................
	eternium = {
		tone = {156,82,222}, alpha = 100;
		cooktime = 500;
		meltpoint = 6;
		artificial = true;
		speed = 2;
		hardness = 10;

		maxenergy = 1200;
		durability = 8100;
		watercool = true;
		mix = {
			metals = {
				iridium = 2;
				tungsten = 2;
................................................................................
		tone = {114,255,214}, alpha = 120;
		meltpoint = 3;
		cooktime = 330;
		artificial = true;
		maxenergy = 4000;
		hardness = 7;
		durability = 3300;

		conduct = 20;
		speed = 3.4;
		slots = {
			{affinity={'praxic'}, confluence = 0.7};
			{affinity={'counterpraxic'}, confluence = 1.2};
			{affinity={'cognic'}, confluence = 1.1};
		};
................................................................................
	draconium = {
		tone = {255,20,80}, alpha = 110;
		artificial=true;
		meltpoint = 5;
		cooktime = 120;
		hardness = 8;
		maxconduct = 15;

		speed = 1.7;
		maxenergy = 2200;
		durability = 1500;
		slots = {
			{affinity={'praxic'},confluence=3};
			{affinity={'syncretic'},confluence=2};
		};
................................................................................
		artificial=true;
		hardness = 20;
		meltpoint = 6;
		cooktime = 240;
		maxenergy = 800;
		durability = 4000;
		speed = 3.0;


		slots = {};
	};
};







>









>







>







 







>

>
>







 







>

>
>







 







>
>










>












>







 







>











>









>







 







>
>







 







>







 







>













>







 







>







 







>







 







>
>







 







>







 







>







 







>







 







>
>



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
..
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
..
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
...
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
...
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
...
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
...
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
...
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
...
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
...
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
...
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
...
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
...
386
387
388
389
390
391
392
393
394
395
396
397
return {
	tin = {
		ingot = 'default:tin_ingot';
		block = 'default:tinblock';
		tone = {172,172,172};
		no_tools = true; no_armor = true; grindhead = true;
		hardness = 2;
		level = 0;
	};
	copper = {
		dye = 'orange';
		ingot = 'default:copper_ingot';
		block = 'default:copperblock';
		tone = {255,176,61};
		no_tools = true; no_armor = true;
		hardness = 2;
		conduct = 0.3;
		level = 0;
	};
	brass = {
		tone = {255,226,87};
		dye = 'bright_orange';
		artificial = true;
		no_tools = true; no_armor = true;
		hardness = 3;
		level = 0; 
		mix = {
			metals = {
				silver = 1;
				copper = 4;
			};
		};
	};
................................................................................
		ingot = 'default:bronze_ingot';
		block = 'default:bronzeblock';
		dye = 'dark_orange';
		artificial = true;
		tone = {229,115,52};
		items = default_items('bronze');
		hardness = 4;
		durability = 300;
		maxenergy = 150;
		speed = 1.4;
		level = 0;
		slots = {
			{affinity = {'counterpraxic'}; confluence = 0.7};
		};
		mix = {
			metals = {
				copper = 4;
				tin = 1;
................................................................................
	};
	steel = {
		ingot = 'default:steel_ingot';
		block = 'default:steelblock';
		tone = {240,240,240};
		items = default_items('steel');
		maxenergy = 200;
		durability = 500;
		hardness = 5;
		speed = 1.9;
		level = 1;
		slots = {
			{affinity = {'praxic'}; confluence = 0.5};
		};
	};
	aluminum = {
		tone = {196,64,32}, alpha = 128;
		dye = 'red';
................................................................................
		meltpoint = 1;
		rarity = 12; depth = 158;
		power = 3; speed = 2.4;
		durability = 700; cooktime = 25;
		hardness = 6;
		armor_weight = 0.3;
		maxenergy = 400;
		level = 1;
		maxlevel = 2;
		slots = {
			{affinity = {'syncretic'}; confluence = 0.7};
			{affinity = {'praxic'}; confluence = 0.4};
		};
	};
	levitanium = {
		tone = {17,255,191}, alpha = 40;
		dye = 'bright_blue';
		meltpoint = 4;
		hardness = 3;
		level = 1;
		rarity = 17; depth = 870;
		power = 1; durability = 50; cooktime = 70;
		armor_weight = -2.2; armor_protection = 1;
		maxenergy = 5000;
		no_tools = true;
	};
	platinum = {
		tone = {255,233,118}, alpha = 50;
		meltpoint = 1;
		rarity = 15; depth = 580;
		power = 4; speed = 3;
		hardness = 6;
		level = 2;
		durability = 1400; cooktime = 40;
		armor_weight = 0.7;
		maxenergy = 1000;
		slots = {
			{affinity = {'praxic','counterpraxic'}; confluence = 0.3};
			{affinity = {'counterpraxic'}; confluence = 0.8};
		}
................................................................................
	};
	gold = {
		dye = 'yellow';
		ingot = 'default:gold_ingot';
		block = 'default:goldblock';
		tone = {255,225,47};
		hardness = 1;
		level = 1;
		maxenergy = 3000;
		slots = {
			{affinity = {'praxic','counterpraxic'}; confluence = 1.4};
			{affinity = {'praxic','counterpraxic'}; confluence = 1.2};
		}
	};
	silver = {
		tone = {218,255,246};
		dye = 'white';
		maxenergy = 2000;
		hardness = 1;
		level = 1;
		depth = 380; rarity = 13.5;
		no_armor = true; no_tools = true;
		power = 1; cooktime = 8; hardness = 1;
	};
	electrum = {
		tone = {212, 255, 0}, alpha = 80;
		artificial = true;
		hardness = 1;
		conduct = 2;
		level = 1;
		dye = 'bright_green';
		mix = {
			metals = {
				silver = 1;
				gold = 1;
			};
		};
................................................................................
		speed = 2.8;
		power = 4;
		hardness = 8;
		meltpoint = 4;
		cooktime = 100;
		durability = 2700;
		maxenergy = 1500;
		level = 2;
		maxlevel = 3;
		slots = {
			{affinity = {'counterpraxic'}, confluence = 0.6};
			{affinity = {'praxic','counterpraxic'}, confluence = 1};
			{affinity = {'praxic'}, confluence = 0.5};
		};
	};
	cobalt = {
................................................................................
		rarity = 17;
		durabilty = 900;
		hardness = 6;
		power = 3;
		speed = 3.5;
		cooktime = 30;
		maxenergy = 3500;
		level = 2;
		slots = {
			{
				affinity = {'counterpraxic'};
				confluence = 0.65;
				interference = {speed = 1};
			};
		}
................................................................................
	};
	lithium = {
		tone = {255,252,93}, alpha = 80;
		dye = 'yellow';
		rarity = 13;
		hardness = 2;
		fuel = 80;
		level = 1;
		no_tools = true;
		no_armor = true;
	};
	vidrium = {
		tone = {119,185,221}, alpha = 140;
		artificial = true;
		dye = 'cyan';
		hardness = 1;
		durability = 300;
		meltpoint = 2;
		cooktime = 20;
		no_tools = true, no_armor = true;
		conduct = 5;
		level = 1;
		mix = {
			metals = {
				lithium = 2;
				tin = 4;
				gold = 1;
			}
		};
................................................................................
	iridium = {
		tone = {209,88,241}, alpha = 80;
		dye = 'purple';
		rarity = 18;
		meltpoint = 3;
		cooktime = 340;
		hardness = 7;
		level = 3;
		maxenergy = 1800;
		conduct = 10;
		durability = 1900;
		speed = 3;
		img = {
			-- ingot = 'sorcery_iridium_ingot.png';
			-- block = 'sorcery_iridium_block.png';
................................................................................
		tone = {255,64,175}, alpha = 70;
		cooktime = 120;
		artificial = true;
		durability = 3400;
		speed = 3.1;
		hardness = 9;
		power = 5;
		level = 4;
		mix = {
			metals = {
				platinum = 4;
				aluminum = 4;
				tin = 1;
			};
		};
................................................................................
	impervium = {
		tone = {226,255,107}, alpha = 90;
		cooktime = 260;
		meltpoint = 5;
		artificial = true;
		speed = 2.1;
		hardness = 15;
		level = 4;
		maxlevel = 5;
		durability = 5300;
		maxenergy = 2300;
		watercool = true;
		mix = {
			metals = {
				duranium = 4;
				iridium = 2;
................................................................................
	eternium = {
		tone = {156,82,222}, alpha = 100;
		cooktime = 500;
		meltpoint = 6;
		artificial = true;
		speed = 2;
		hardness = 10;
		level = 4;
		maxenergy = 1200;
		durability = 8100;
		watercool = true;
		mix = {
			metals = {
				iridium = 2;
				tungsten = 2;
................................................................................
		tone = {114,255,214}, alpha = 120;
		meltpoint = 3;
		cooktime = 330;
		artificial = true;
		maxenergy = 4000;
		hardness = 7;
		durability = 3300;
		level = 5;
		conduct = 20;
		speed = 3.4;
		slots = {
			{affinity={'praxic'}, confluence = 0.7};
			{affinity={'counterpraxic'}, confluence = 1.2};
			{affinity={'cognic'}, confluence = 1.1};
		};
................................................................................
	draconium = {
		tone = {255,20,80}, alpha = 110;
		artificial=true;
		meltpoint = 5;
		cooktime = 120;
		hardness = 8;
		maxconduct = 15;
		level = 2;
		speed = 1.7;
		maxenergy = 2200;
		durability = 1500;
		slots = {
			{affinity={'praxic'},confluence=3};
			{affinity={'syncretic'},confluence=2};
		};
................................................................................
		artificial=true;
		hardness = 20;
		meltpoint = 6;
		cooktime = 240;
		maxenergy = 800;
		durability = 4000;
		speed = 3.0;
		level = 3;
		maxlevel = 4;
		slots = {};
	};
};

Modified data/spells.lua from [0d89fbd301] to [c7b64d56d8].

475
476
477
478
479
480
481


482
483
484
485
486
487
488
							   restrict.group = 'sorcery_worship'
						   elseif mod == sorcery.data.metals.gold.parts.powder then
							   restrict.group = 'sorcery_grease'
						   elseif mod == sorcery.data.metals.silver.parts.powder then
							   restrict.group = 'sorcery_oil'
						   elseif mod == sorcery.data.metals.electrum.parts.powder then
							   restrict.group = 'sorcery_extract'


						   elseif mod == 'farming:sugar' then
							   restrict.mod = 'farming'
						   else return false end
					   end
				   elseif ink1 == 'black' and ink2 == 'white' then kind = 'infuse'
					   if mod then
						   if mod == sorcery.data.metals.gold.parts.powder then







>
>







475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
							   restrict.group = 'sorcery_worship'
						   elseif mod == sorcery.data.metals.gold.parts.powder then
							   restrict.group = 'sorcery_grease'
						   elseif mod == sorcery.data.metals.silver.parts.powder then
							   restrict.group = 'sorcery_oil'
						   elseif mod == sorcery.data.metals.electrum.parts.powder then
							   restrict.group = 'sorcery_extract'
						   elseif mod == sorcery.data.metals.steel.parts.powder then
							   restrict.group = 'crafttool'
						   elseif mod == 'farming:sugar' then
							   restrict.mod = 'farming'
						   else return false end
					   end
				   elseif ink1 == 'black' and ink2 == 'white' then kind = 'infuse'
					   if mod then
						   if mod == sorcery.data.metals.gold.parts.powder then

Modified depends.txt from [37d6e3fb32] to [77f19ef08b].



1
2

3
4
5



farming
xdecor

vessels
late
instant_ores

>
>


>



>
1
2
3
4
5
6
7
8
9
default
tnt?
farming
xdecor
basic_materials
vessels
late
instant_ores
screwdriver

Modified disassembly.lua from [5131b0247b] to [5366481e82].

43
44
45
46
47
48
49





50
51
52
53
54
55
56
..
63
64
65
66
67
68
69

70
71
72

73
74
75
76
77
78
79
80
81
82
83







84





85







86
87
88
89
90
91
92
	tiles = {
		'default_copper_block.png';
		'default_wood.png';
		'default_steel_block.png';
		'default_stone.png';
		'default_gold_block.png';
		'default_coal_block.png';





	};
	after_dig_node = sorcery.lib.node.purge_container;
	on_construct = function(pos)
		local m = minetest.get_meta(pos)
		local i = m:get_inventory()
		i:set_size('item',1)
		i:set_size('paper',1)
................................................................................
			list[current_player;main;0.25,2;8,4]

			list[context;item;0.25,0.5;1,1;]
			list[context;paper;2.25,0.5;1,1;]
			list[context;ink;4.25,0.5;3,1;]
			list[context;output;9,0.5;1,1;]


			listring[current_player;main] listring[context;item]
			listring[current_player;main] listring[context;paper]
			listring[current_player;main] listring[context;ink]

		]])
	end;
	on_metadata_inventory_put = update_disassembler;
	on_metadata_inventory_take = function(pos,list,idx,stack,user)
		local m = minetest.get_meta(pos)
		local i = m:get_inventory()
		local paper = i:get_stack('paper',1)
		local item = i:get_stack('item',1)

		if list == 'output' then
			local count = stack:get_count()







			item:take_item(count)





			i:set_stack('item',1,item)







			for j=1,i:get_size('ink') do
				local ink = i:get_stack('ink',j)
				ink:take_item(count)
				i:set_stack('ink',j,ink)
			end
		end








>
>
>
>
>







 







>
|
|
|
>











>
>
>
>
>
>
>

>
>
>
>
>
|
>
>
>
>
>
>
>







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
	tiles = {
		'default_copper_block.png';
		'default_wood.png';
		'default_steel_block.png';
		'default_stone.png';
		'default_gold_block.png';
		'default_coal_block.png';
	};
	_sorcery = {
		recipe = {
			note = 'Destroy a device or object to learn how it is crafted';
		};
	};
	after_dig_node = sorcery.lib.node.purge_container;
	on_construct = function(pos)
		local m = minetest.get_meta(pos)
		local i = m:get_inventory()
		i:set_size('item',1)
		i:set_size('paper',1)
................................................................................
			list[current_player;main;0.25,2;8,4]

			list[context;item;0.25,0.5;1,1;]
			list[context;paper;2.25,0.5;1,1;]
			list[context;ink;4.25,0.5;3,1;]
			list[context;output;9,0.5;1,1;]

			listring[context;output]
			listring[current_player;main] listring[context;paper]
			listring[current_player;main] listring[context;ink]
			listring[current_player;main] listring[context;item]
			listring[current_player;main]
		]])
	end;
	on_metadata_inventory_put = update_disassembler;
	on_metadata_inventory_take = function(pos,list,idx,stack,user)
		local m = minetest.get_meta(pos)
		local i = m:get_inventory()
		local paper = i:get_stack('paper',1)
		local item = i:get_stack('item',1)

		if list == 'output' then
			local count = stack:get_count()
			local leftover = sorcery.data.infusion_leftovers[item:get_name()]
			local lstack if leftover then
				lstack = ItemStack(leftover)
				lstack:set_count(lstack:get_count() * count)
				-- this slightly idiosyncratic code is used to ensure that
				-- itemstrings can be used in the infusion leftovers table
			end
			item:take_item(count)
			if item:get_count() > 0 then
				if leftover then
					lstack = user:get_inventory():add_item(lstack)
					if lstack:get_count() > 0 then minetest.add_item(pos,lstack) end
				end
				i:set_stack('item',1,item)
			else
				if leftover then
					i:set_stack('item',1,lstack)
				else
					i:set_stack('item',1,ItemStack())
				end
			end
			for j=1,i:get_size('ink') do
				local ink = i:get_stack('ink',j)
				ink:take_item(count)
				i:set_stack('ink',j,ink)
			end
		end

Modified farcaster.lua from [6f8ef41220] to [af0360a5f2].

19
20
21
22
23
24
25



26
27
28
29
30
31
32
..
78
79
80
81
82
83
84



85
86
87
88
89
90
91
				if tune then return 0.3 else return 0 end
			end
		};
		attune = {
			class = 'sorcery:raycaster', accepts = 'sorcery:raycaster';
			source = true, target = true, reciprocal = true;
		};



		farcaster = {
			partner = function(pos)
				local tune = sorcery.attunement.verify(pos)
				if not tune then return nil end
				minetest.load_area(tune.partner)
				local vis = false
				local ignored
................................................................................
				end
			end;
		};
		attune = {
			class = 'sorcery:farcaster', accepts = 'sorcery:farcaster';
			source = true, target = true, reciprocal = true;
		};



		farcaster = {
			partner = function(pos)
				local tune = sorcery.attunement.verify(pos)
				if not tune then return nil end

				return tune.partner
			end;







>
>
>







 







>
>
>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
				if tune then return 0.3 else return 0 end
			end
		};
		attune = {
			class = 'sorcery:raycaster', accepts = 'sorcery:raycaster';
			source = true, target = true, reciprocal = true;
		};
		recipe = {
			note = 'Bridges ley-nets by beam. Line of sight between attuned casters required. Constant power draw of <b>0.3 thaum</b>.';
		};
		farcaster = {
			partner = function(pos)
				local tune = sorcery.attunement.verify(pos)
				if not tune then return nil end
				minetest.load_area(tune.partner)
				local vis = false
				local ignored
................................................................................
				end
			end;
		};
		attune = {
			class = 'sorcery:farcaster', accepts = 'sorcery:farcaster';
			source = true, target = true, reciprocal = true;
		};
		recipe = {
			note = 'Bridges ley-nets by nonlocality. Power draw increases <b>2 thaum/km</b> in distance between caster units.';
		};
		farcaster = {
			partner = function(pos)
				local tune = sorcery.attunement.verify(pos)
				if not tune then return nil end

				return tune.partner
			end;

Modified harvester.lua from [81d31df3a3] to [61997cebcf].

88
89
90
91
92
93
94






95
96
97
98
99
100
101
...
107
108
109
110
111
112
113





114
115
116
117
118
119
120
			list[context;charge;2.5,0;3,1;]
			list[current_player;main;0,1.3;8,4;]
			listring[]
		]])
	end;
	on_metadata_inventory_put = update_inv;
	on_metadata_inventory_move = update_inv;






})

minetest.register_craftitem('sorcery:harvester_receptacle', {
	description = 'Harvester Receptacle';
	inventory_image = 'sorcery_harvester_receptacle.png';
})

................................................................................
		{'stairs:slab_stone','stairs:slab_stone','stairs:slab_stone'};
	};
}

minetest.register_craftitem('sorcery:accumulator', {
	description = 'Accumulator';
	inventory_image = 'sorcery_accumulator.png';





})

minetest.register_craft {
	output = 'sorcery:accumulator';
	recipe = {
		{'default:tin_ingot', 'default:tin_ingot', 'default:tin_ingot'};
		{'sorcery:gem_amethyst','sorcery:gem_emerald','sorcery:gem_amethyst'};







>
>
>
>
>
>







 







>
>
>
>
>







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
			list[context;charge;2.5,0;3,1;]
			list[current_player;main;0,1.3;8,4;]
			listring[]
		]])
	end;
	on_metadata_inventory_put = update_inv;
	on_metadata_inventory_move = update_inv;

	_sorcery = {
		recipe = {
			info = "Standalone recharger for wands, amulets, and enchanted tools that draws on the ambient force from the local leylines";
		};
	};
})

minetest.register_craftitem('sorcery:harvester_receptacle', {
	description = 'Harvester Receptacle';
	inventory_image = 'sorcery_harvester_receptacle.png';
})

................................................................................
		{'stairs:slab_stone','stairs:slab_stone','stairs:slab_stone'};
	};
}

minetest.register_craftitem('sorcery:accumulator', {
	description = 'Accumulator';
	inventory_image = 'sorcery_accumulator.png';
	_sorcery = {
		recipe = {
			info = 'Captures and channels ambient ley current';
		};
	};
})

minetest.register_craft {
	output = 'sorcery:accumulator';
	recipe = {
		{'default:tin_ingot', 'default:tin_ingot', 'default:tin_ingot'};
		{'sorcery:gem_amethyst','sorcery:gem_emerald','sorcery:gem_amethyst'};

Modified infuser.lua from [994388d832] to [0d2fb4d9eb].

208
209
210
211
212
213
214





215
216
217
218
219
220
221
		"default_bronze_block.png",
		"default_tin_block.png",
	};
	paramtype2 = 'facedir';
	groups = {
		cracky = 2, oddly_breakable_by_hand = 1, heavy = 1;
		sorcery_alchemy = 1, sorcery_magitech = 1;





	};
	selection_box = {
		type = 'fixed';
		fixed = {
			-0.37, -0.5, -0.37,
			 0.37,  0.5,  0.37
		};







>
>
>
>
>







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
		"default_bronze_block.png",
		"default_tin_block.png",
	};
	paramtype2 = 'facedir';
	groups = {
		cracky = 2, oddly_breakable_by_hand = 1, heavy = 1;
		sorcery_alchemy = 1, sorcery_magitech = 1;
	};
	_sorcery = {
		recipe = {
			note = 'Infuse special ingredients into liquids to create and alter powerful potions';
		};
	};
	selection_box = {
		type = 'fixed';
		fixed = {
			-0.37, -0.5, -0.37,
			 0.37,  0.5,  0.37
		};

Modified itemclass.lua from [c60971c6b0] to [25dadd17e3].

42
43
44
45
46
47
48

49
50
51
52
53
54
55
56
57
58
59
60






61
62
63
64
65
66
67
..
71
72
73
74
75
76
77




78
79
80
81
82
83
84
			compat = 'grindables';
			subclass = {'metallic'};
			conform = {
				metallic = function(m)
					if m and m.data and m.data.parts and m.data.parts.powder then
						return {
							hardness = m.data.hardness;

							value = m.value or 1, grindcost = 1;
							powder = m.data.parts.powder;
						}
					end
				end;
			};
			predicate = function(name)
				local def = minetest.registered_items[name]._sorcery
				if not def then return nil end
				def = def.material
				if def and def.grindvalue then
					return def end






			end;
		};
		metal = {
			predicate = function(name)
				-- metallookup is a table of 'primary' metal
				-- items, like ingots, fragments, and powders
				return sorcery.data.metallookup[name]
................................................................................
			subclass = {'metal'};
			predicate = function(name)
				-- matreg is a registry binding crafted items,
				-- like armors and tools, to the material they
				-- are made out of
				local mat = sorcery.matreg.lookup[name]
				if mat and mat.metal then return mat end




			end;
		};
		ore = {
			groups = { 'ore' };
			compat = 'ore';
			predicate = function(name)
				-- maybe revise this at some point once sorcery is extricated







>
|










|
>
>
>
>
>
>







 







>
>
>
>







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
..
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
			compat = 'grindables';
			subclass = {'metallic'};
			conform = {
				metallic = function(m)
					if m and m.data and m.data.parts and m.data.parts.powder then
						return {
							hardness = m.data.hardness;
							grindcost = 1;
							grindvalue = m.value or 1;
							powder = m.data.parts.powder;
						}
					end
				end;
			};
			predicate = function(name)
				local def = minetest.registered_items[name]._sorcery
				if not def then return nil end
				def = def.material
				if def and def.grindvalue then
					return {
						hardness = def.data.hardness;
						grindcost = def.grindcost or 1;
						grindvalue = def.grindvalue;
						powder = def.powder or def.data.parts.powder;
					}
				end
			end;
		};
		metal = {
			predicate = function(name)
				-- metallookup is a table of 'primary' metal
				-- items, like ingots, fragments, and powders
				return sorcery.data.metallookup[name]
................................................................................
			subclass = {'metal'};
			predicate = function(name)
				-- matreg is a registry binding crafted items,
				-- like armors and tools, to the material they
				-- are made out of
				local mat = sorcery.matreg.lookup[name]
				if mat and mat.metal then return mat end
				local prop = minetest.registered_items[name]._sorcery
				if prop and prop.material and prop.material.metal then
					return prop.material
				end
			end;
		};
		ore = {
			groups = { 'ore' };
			compat = 'ore';
			predicate = function(name)
				-- maybe revise this at some point once sorcery is extricated

Modified leylines.lua from [0e41979f02] to [58178ad533].

61
62
63
64
65
66
67

68
69
70
71
72
73
74
...
160
161
162
163
164
165
166
167

168
169
170
171
172
173
174
...
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
...
320
321
322
323
324
325
326



327
328
329
330
331
332
333
...
784
785
786
787
788
789
790



791
792
793
	};
	groups = {
		sorcery_ley_device = 1;
		cracky = 3;
	};
	_sorcery = {
		ley = { mode = 'signal'; power = 100 };

	};
})
minetest.register_craft {
	output = 'sorcery:conduit 4';
	recipe = {
		{'default:copper_ingot', 'default:copper_ingot',  'default:copper_ingot'};
		{'default:copper_ingot', 'sorcery:electrumblock', 'default:copper_ingot'};
................................................................................
		paramtype2 = 'facedir';
		groups = {
			cracky = 2;
			choppy = 1;
			sorcery_ley_device = 1;
		};
		_sorcery = {
			ley = { mode = 'signal'; power = 50; }

		};
		tiles = tiles;
	})
	minetest.register_craft {
		output = id .. ' 4';
		recipe = {
			{item, 'sorcery:conduit'};
................................................................................
			drawtype = 'nodebox';
			groups = {
				sorcery_ley_device = 1; snappy = 3; attached = 1;
				sorcery_ley_cable = 1;
			};
			_sorcery = {
				ley = { mode = 'signal', power = metal.conduct };
				recipe = { note = 'Conducts up to ' .. metal.conduct .. ' thaum/sec'; };
			};
			sunlight_propagates = true;
			node_box = {
				type = 'connected';
				disconnected   = { -0.05, -0.35, -0.40; 0.05, -0.25, 0.40 };
				connect_front  = { -0.05, -0.35, -0.50; 0.05, -0.25, 0.05 };
				connect_back   = { -0.05, -0.35, -0.05; 0.05, -0.25, 0.50 };
................................................................................
				power = function(pos,time)
					return sorcery.ley.field_to_current(sorcery.ley.estimate(pos).force, time);
				end;
				affinity = function(pos)
					return sorcery.ley.estimate(pos).aff
				end;
			};



		};
	})
end

minetest.register_craft {
	output = 'sorcery:condenser';
	recipe = {
................................................................................
			ley = {
				mode = 'produce', affinity = {'praxic'};
				power = function(pos,delta)
					local meta = minetest.get_meta(pos)
					return meta:get_float('power') * delta;
				end;
			};



		};
	})
end







>







 







|
>







 







|







 







>
>
>







 







>
>
>



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
...
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
...
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
...
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
...
789
790
791
792
793
794
795
796
797
798
799
800
801
	};
	groups = {
		sorcery_ley_device = 1;
		cracky = 3;
	};
	_sorcery = {
		ley = { mode = 'signal'; power = 100 };
		recipe = { note = 'Conducts up to <b>100 thaum</b>' };
	};
})
minetest.register_craft {
	output = 'sorcery:conduit 4';
	recipe = {
		{'default:copper_ingot', 'default:copper_ingot',  'default:copper_ingot'};
		{'default:copper_ingot', 'sorcery:electrumblock', 'default:copper_ingot'};
................................................................................
		paramtype2 = 'facedir';
		groups = {
			cracky = 2;
			choppy = 1;
			sorcery_ley_device = 1;
		};
		_sorcery = {
			ley = { mode = 'signal'; power = 50 };
			recipe = { note = 'Conducts up to <b>50 thaum</b>' };
		};
		tiles = tiles;
	})
	minetest.register_craft {
		output = id .. ' 4';
		recipe = {
			{item, 'sorcery:conduit'};
................................................................................
			drawtype = 'nodebox';
			groups = {
				sorcery_ley_device = 1; snappy = 3; attached = 1;
				sorcery_ley_cable = 1;
			};
			_sorcery = {
				ley = { mode = 'signal', power = metal.conduct };
				recipe = { note = 'Conducts up to <b>' .. metal.conduct .. ' thaum</b>'; };
			};
			sunlight_propagates = true;
			node_box = {
				type = 'connected';
				disconnected   = { -0.05, -0.35, -0.40; 0.05, -0.25, 0.40 };
				connect_front  = { -0.05, -0.35, -0.50; 0.05, -0.25, 0.05 };
				connect_back   = { -0.05, -0.35, -0.05; 0.05, -0.25, 0.50 };
................................................................................
				power = function(pos,time)
					return sorcery.ley.field_to_current(sorcery.ley.estimate(pos).force, time);
				end;
				affinity = function(pos)
					return sorcery.ley.estimate(pos).aff
				end;
			};
			recipe = {
				note = 'Captures radiant force and suffuses it through distribution net. Energy production varies with local leyline strength.';
			};
		};
	})
end

minetest.register_craft {
	output = 'sorcery:condenser';
	recipe = {
................................................................................
			ley = {
				mode = 'produce', affinity = {'praxic'};
				power = function(pos,delta)
					local meta = minetest.get_meta(pos)
					return meta:get_float('power') * delta;
				end;
			};
			recipe = {
				note = 'Temporarily provide up to <b>' ..tostring(constants.generator_max_energy_output) .. ' thaum</b> of ley-force from heat by burning fuel';
			};
		};
	})
end

Modified lib/tbl.lua from [5997708826] to [5046584198].

55
56
57
58
59
60
61
62


















































63
	return ks
end

fn.pick = function(lst)
	local keys = fn.keys(lst)
	return keys[math.random(#keys)]
end



















































return fn








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
	return ks
end

fn.pick = function(lst)
	local keys = fn.keys(lst)
	return keys[math.random(#keys)]
end

fn.unpack = function(tbl,i)
	if i and #tbl == i then return tbl[i] end
	i = i or 1
	return tbl[i], fn.unpack(tbl, i+1)
end

fn.each = function(tbl,fn)
	local r = {}
	for k,v in pairs(tbl) do
		r[#r+1] = fn(v,k)
	end
	return r
end

fn.each_o = function(tbl,fn)
	local keys = fn.keys(tbl)
	table.sort(keys)
	return fn.each(keys, function(k,i)
		return fn(tbl[k],k,i)
	end)
end

fn.iter = function(tbl,fn)
	for i=1,#tbl do
		fn(tbl[i], i)
	end
end

fn.map = function(tbl,fn)
	local new = {}
	for k,v in pairs(tbl) do
		local nv, nk = fn(v, k)
		new[nk or k] = nv
	end
	return new
end

fn.fold = function(tbl,fn,acc)
	if #tbl == 0 then
		fn.each_o(tbl, function(v)
			acc = fn(acc, v, k)
		end)
	else
		for i=0,#tbl do
			acc = fn(acc,tbl[i],i)
		end
	end
	return acc
end

return fn

Modified metallurgy-cold.lua from [e432fc7b5e] to [c145d6a94a].

345
346
347
348
349
350
351





352
353
354
355
356
357
358
	local id = 'sorcery:mill_grindhead_' .. name
	minetest.register_tool(id,{
		description = sorcery.lib.str.capitalize(name) .. ' Grinding Head';
		inventory_image = sorcery.lib.image('sorcery_mill_grindhead.png'):multiply(sorcery.lib.color(metal.tone)):render();
		groups = { sorcery_mill_grindhead = 1, sorcery_metallurgy = 1 };
		_proto = {
			metal = name;





		};
	});
	minetest.register_craft {
		output = id;
		recipe = {
			{f,i,f};
			{i,'',i};







>
>
>
>
>







345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
	local id = 'sorcery:mill_grindhead_' .. name
	minetest.register_tool(id,{
		description = sorcery.lib.str.capitalize(name) .. ' Grinding Head';
		inventory_image = sorcery.lib.image('sorcery_mill_grindhead.png'):multiply(sorcery.lib.color(metal.tone)):render();
		groups = { sorcery_mill_grindhead = 1, sorcery_metallurgy = 1 };
		_proto = {
			metal = name;
		};
		_sorcery = {
			recipe = {
				note = 'Needed by mills in order to operate. The stronger the metal, the longer the head lasts, the harder the materials it can pulverize, and the faster it grinds.';
			};
		};
	});
	minetest.register_craft {
		output = id;
		recipe = {
			{f,i,f};
			{i,'',i};

Modified metallurgy-hot.lua from [222da491b8] to [c9beb59240].

412
413
414
415
416
417
418





419
420
421
422
423
424
425
			tiles = {
				'sorcery_smelter_top_' .. tostring(kind.size) .. '.png';
				'sorcery_smelter_bottom.png';
				'sorcery_smelter_side.png';
				'sorcery_smelter_side.png';
				'sorcery_smelter_side.png';
				'sorcery_smelter_front' .. ((active and '_hot') or '') .. '.png';





			};
		})
	end
	minetest.register_craft {
		recipe = recipe;
		output = id;
	}







>
>
>
>
>







412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
			tiles = {
				'sorcery_smelter_top_' .. tostring(kind.size) .. '.png';
				'sorcery_smelter_bottom.png';
				'sorcery_smelter_side.png';
				'sorcery_smelter_side.png';
				'sorcery_smelter_side.png';
				'sorcery_smelter_front' .. ((active and '_hot') or '') .. '.png';
			};
			_sorcery = {
				recipe = {
					note = 'Smelt alloys from raw metals combined in various ratios';
				};
			};
		})
	end
	minetest.register_craft {
		recipe = recipe;
		output = id;
	}

Added models/sorcery-writing-stand.obj version [67a1cd621a].























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
# Blender v2.82 (sub 7) OBJ File: 'writing-stand.blend'
# www.blender.org
mtllib sorcery-writing-stand.mtl
o ink_Cube.011
v -0.316540 -0.332319 -0.197674
v -0.339437 -0.332319 -0.153270
v -0.383842 -0.332319 -0.176167
v -0.360945 -0.332319 -0.220572
v -0.316540 -0.339532 -0.197674
v -0.339437 -0.339532 -0.153270
v -0.383842 -0.339532 -0.176167
v -0.360945 -0.339532 -0.220572
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 1.0000 0.0000
vn 0.4583 0.0000 -0.8888
vn 0.8888 0.0000 0.4583
vn -0.8888 0.0000 -0.4583
vn -0.4583 0.0000 0.8888
g ink_Cube.011_ink
usemtl ink
s off
f 3/1/1 4/2/1 1/3/1 2/4/1
f 7/5/2 6/6/2 5/7/2 8/8/2
f 3/1/3 2/4/3 6/6/3 7/5/3
f 4/2/4 3/1/4 7/5/4 8/8/4
f 2/4/5 1/3/5 5/7/5 6/6/5
f 1/3/6 4/2/6 8/8/6 5/7/6
o wood_Cube.014
v -0.348948 -0.277485 -0.211664
v -0.321989 -0.279657 -0.196141
v -0.355224 -0.292284 -0.202835
v -0.328265 -0.294456 -0.187312
v -0.273207 -0.398159 -0.360099
v -0.246248 -0.400332 -0.344577
v -0.252524 -0.415131 -0.335748
v -0.279483 -0.412958 -0.351270
v -0.345859 -0.280020 -0.208026
v -0.326953 -0.281543 -0.197141
v -0.331354 -0.291921 -0.190950
v -0.350260 -0.290398 -0.201835
v 0.025418 -0.500000 0.319472
v -0.006255 -0.500000 0.180570
v 0.147454 -0.500000 0.291645
v 0.115781 -0.500000 0.152743
v 0.115781 -0.468359 0.152743
v -0.006255 -0.468359 0.180570
v 0.025418 -0.468359 0.319472
v 0.147454 -0.468359 0.291645
v 0.096556 -0.468359 0.188214
v 0.026446 -0.468359 0.204201
v 0.044643 -0.468359 0.284001
v 0.114753 -0.468359 0.268015
v 0.096556 -0.179958 0.188214
v 0.026446 -0.179958 0.204201
v 0.044643 -0.179958 0.284001
v 0.114753 -0.179958 0.268015
v 0.114753 -0.377388 0.268015
v 0.114753 -0.458476 0.268015
v 0.096556 -0.458476 0.188214
v 0.096556 -0.377388 0.188214
v 0.110770 -0.395135 0.250550
v 0.110770 -0.440729 0.250550
v 0.100539 -0.440729 0.205679
v 0.100539 -0.395135 0.205679
v 0.145454 -0.179958 0.163194
v -0.028464 -0.179958 0.202852
v -0.004255 -0.179958 0.309022
v 0.169664 -0.179958 0.269364
v 0.145454 -0.126606 0.163194
v -0.028464 -0.036922 0.202852
v -0.004255 0.046263 0.309022
v 0.169664 -0.043421 0.269364
v 0.056318 -0.500000 -0.227711
v -0.117600 -0.500000 -0.188054
v -0.093391 -0.500000 -0.081884
v 0.080528 -0.500000 -0.121541
v 0.056319 -0.431639 -0.227711
v -0.117600 -0.341955 -0.188054
v -0.093391 -0.258770 -0.081884
v 0.080528 -0.348454 -0.121541
v 0.155509 -0.440729 0.240348
v 0.200247 -0.440729 0.230147
v 0.190016 -0.440729 0.185277
v 0.145277 -0.440729 0.195478
v 0.155509 -0.395135 0.240348
v 0.200247 -0.395135 0.230147
v 0.145277 -0.395135 0.195478
v 0.190015 -0.395135 0.185277
v 0.073362 -0.440729 -0.119907
v 0.073362 -0.395135 -0.119907
v 0.080528 -0.440729 -0.121541
v 0.080528 -0.395135 -0.121541
v 0.118100 -0.395135 -0.130108
v 0.118100 -0.440729 -0.130108
v 0.056319 -0.459216 -0.227711
v 0.056319 -0.482622 -0.227711
v -0.117600 -0.460428 -0.188054
v -0.117600 -0.407126 -0.188054
v -0.093391 -0.358359 -0.081884
v -0.093391 -0.439649 -0.081884
v 0.046967 -0.459216 -0.257427
v 0.042793 -0.482622 -0.275730
v -0.135573 -0.460428 -0.278169
v -0.131399 -0.407126 -0.259866
v 0.043006 -0.459216 -0.291300
v 0.043006 -0.482622 -0.291300
v -0.135360 -0.460428 -0.293739
v -0.135360 -0.407126 -0.293739
v 0.050708 -0.430911 -0.277148
v -0.127658 -0.378822 -0.279588
v 0.051271 -0.430911 -0.291187
v -0.127095 -0.378822 -0.293626
v 0.041878 -0.500000 -0.291042
v -0.141385 -0.500000 -0.292365
v 0.485994 -0.500000 0.214450
v 0.454321 -0.500000 0.075548
v 0.363958 -0.500000 0.242277
v 0.332285 -0.500000 0.103375
v 0.332285 -0.468359 0.103375
v 0.454321 -0.468359 0.075548
v 0.485994 -0.468359 0.214450
v 0.363958 -0.468359 0.242277
v 0.364986 -0.468359 0.127006
v 0.435096 -0.468359 0.111019
v 0.453293 -0.468359 0.190819
v 0.383183 -0.468359 0.206806
v 0.364986 -0.179958 0.127006
v 0.435096 -0.179958 0.111019
v 0.453293 -0.179958 0.190819
v 0.383183 -0.179958 0.206806
v 0.383183 -0.377388 0.206806
v 0.383183 -0.458476 0.206806
v 0.364986 -0.458476 0.127006
v 0.364986 -0.377388 0.127006
v 0.379200 -0.395135 0.189341
v 0.379200 -0.440729 0.189341
v 0.368969 -0.440729 0.144471
v 0.368969 -0.395135 0.144471
v 0.244985 -0.395135 0.219945
v 0.244985 -0.440729 0.219945
v 0.234754 -0.440729 0.175075
v 0.234754 -0.395135 0.175075
v 0.310076 -0.179958 0.125656
v 0.483994 -0.179958 0.085999
v 0.508203 -0.179958 0.192169
v 0.334285 -0.179958 0.231827
v 0.310076 -0.126606 0.125656
v 0.483994 -0.036922 0.085999
v 0.508203 0.046263 0.192169
v 0.334285 -0.043421 0.231827
v 0.251974 -0.179958 0.250595
v 0.227765 -0.179958 0.144425
v 0.251974 -0.086934 0.250595
v 0.227765 -0.170899 0.144425
v 0.220940 -0.500000 -0.265249
v 0.394858 -0.500000 -0.304906
v 0.419068 -0.500000 -0.198736
v 0.245149 -0.500000 -0.159079
v 0.220940 -0.431639 -0.265249
v 0.394858 -0.341955 -0.304906
v 0.419068 -0.258770 -0.198736
v 0.245149 -0.348454 -0.159079
v 0.162839 -0.500000 -0.140310
v 0.138629 -0.500000 -0.246480
v 0.162839 -0.391967 -0.140310
v 0.138629 -0.475931 -0.246480
v 0.334462 -0.440729 0.199543
v 0.289724 -0.440729 0.209744
v 0.279492 -0.440729 0.164874
v 0.324230 -0.440729 0.154672
v 0.334462 -0.395135 0.199543
v 0.289724 -0.395135 0.209744
v 0.324230 -0.395135 0.154672
v 0.279492 -0.395135 0.164874
v 0.252315 -0.440729 -0.160713
v 0.252315 -0.395135 -0.160713
v 0.245149 -0.440729 -0.159079
v 0.245149 -0.395135 -0.159079
v 0.207577 -0.395135 -0.150511
v 0.207577 -0.440729 -0.150511
v 0.220940 -0.459215 -0.265249
v 0.220940 -0.482622 -0.265249
v 0.394858 -0.460428 -0.304906
v 0.394858 -0.407126 -0.304906
v 0.419068 -0.358359 -0.198736
v 0.419068 -0.439649 -0.198736
v 0.162839 -0.473265 -0.140310
v 0.162839 -0.437254 -0.140310
v 0.138629 -0.486021 -0.246480
v 0.138629 -0.494044 -0.246480
v 0.216485 -0.459216 -0.296081
v 0.212312 -0.482622 -0.314384
v 0.371989 -0.460428 -0.393905
v 0.376162 -0.407126 -0.375602
v 0.205370 -0.459215 -0.328323
v 0.205370 -0.482622 -0.328323
v 0.365047 -0.460428 -0.407844
v 0.365047 -0.407126 -0.407844
v 0.204564 -0.430911 -0.312231
v 0.364241 -0.378822 -0.391752
v 0.197972 -0.430911 -0.324638
v 0.357649 -0.378822 -0.404159
v 0.206499 -0.500000 -0.328580
v 0.371073 -0.500000 -0.409218
vt 0.424217 -0.000000
vt 0.424217 1.000000
vt 0.575783 1.000000
vt 0.575783 -0.000000
vt 0.455431 -0.000000
vt 0.455431 1.000000
vt 0.544569 1.000000
vt 0.544569 -0.000000
vt 0.575783 -0.000000
vt 0.575783 1.000000
vt 0.424217 1.000000
vt 0.424217 -0.000000
vt 0.544569 -0.000000
vt 0.544569 1.000000
vt 0.455431 1.000000
vt 0.455431 -0.000000
vt 0.544569 0.424217
vt 0.544569 0.575783
vt 0.531255 0.553144
vt 0.531255 0.446856
vt 0.455431 0.575783
vt 0.455431 0.424217
vt 0.468745 0.446856
vt 0.468745 0.553144
vt 0.407565 1.427836
vt 0.407565 1.202985
vt 0.605112 1.202985
vt 0.605112 1.427836
vt 0.407565 1.202985
vt 0.407565 1.427836
vt 0.449593 1.380000
vt 0.449593 1.250822
vt 0.407565 0.372190
vt 0.605112 0.372190
vt 0.605112 0.422128
vt 0.407565 0.422128
vt 0.605112 0.372190
vt 0.407565 0.372190
vt 0.407565 0.422128
vt 0.605112 0.422128
vt 1.202985 0.372190
vt 1.427836 0.372190
vt 1.427836 0.422128
vt 1.202985 0.422128
vt 1.427836 0.372190
vt 1.202985 0.372190
vt 1.202985 0.422128
vt 1.427836 0.422128
vt 0.449593 0.422128
vt 0.563085 0.422128
vt 0.563085 0.877301
vt 0.449593 0.877301
vt 0.449593 0.565705
vt 0.449593 0.437726
vt 0.605112 1.427836
vt 0.605112 1.202985
vt 0.563085 1.250822
vt 0.563085 1.380000
vt 0.449593 1.380000
vt 0.563085 1.380000
vt 0.647106 1.401343
vt 0.365571 1.401343
vt 0.563085 0.422128
vt 0.449593 0.422128
vt 0.449593 0.437726
vt 0.449593 0.565705
vt 0.449593 0.877301
vt 0.563085 0.877301
vt 1.250822 0.565705
vt 1.380000 0.565705
vt 1.380000 0.877301
vt 1.250822 0.877301
vt 1.380000 0.422128
vt 1.250822 0.422128
vt 1.250822 0.877301
vt 1.380000 0.877301
vt 1.250822 0.422128
vt 1.380000 0.422128
vt 1.380000 0.437726
vt 1.250822 0.437726
vt 1.351728 0.465735
vt 1.279093 0.465735
vt 0.304750 1.279093
vt 0.304750 1.351728
vt 0.232329 1.351728
vt 0.232329 1.279093
vt 1.279093 0.537695
vt 1.351728 0.537695
vt 0.304750 0.465735
vt 0.304750 0.537695
vt 0.232329 0.537695
vt 0.232329 0.465735
vt 0.304750 1.351728
vt 0.304750 1.279093
vt 0.232329 1.279093
vt 0.232329 1.351728
vt 0.304750 0.537695
vt 0.304750 0.465735
vt 0.232329 0.465735
vt 0.232329 0.537695
vt 0.365571 1.229478
vt 0.232329 1.401343
vt 0.232329 1.229478
vt 0.563085 1.250822
vt 0.449593 1.250822
vt 0.647106 1.229478
vt 0.365571 1.401343
vt 0.647106 1.401343
vt 0.647106 1.229478
vt 0.365571 1.229478
vt 1.401343 0.877301
vt 1.229478 0.877301
vt 1.229478 1.105982
vt 1.401343 1.238500
vt 0.365571 0.877301
vt 0.647106 0.877301
vt 0.647106 1.238500
vt 0.365571 1.096955
vt 0.647106 0.877301
vt 0.365571 0.877301
vt 0.365571 0.964437
vt 0.647106 1.105982
vt 0.232329 1.024115
vt 0.232329 0.877301
vt 0.232329 0.877301
vt 0.232329 0.891598
vt 0.232329 1.229478
vt 0.232329 1.401343
vt 0.365571 0.596692
vt 0.647106 0.596692
vt 0.647106 0.768557
vt 0.365571 0.768557
vt 0.232329 0.768557
vt 0.232329 0.596692
vt 0.365571 0.768557
vt 0.647106 0.768557
vt 0.647106 0.596692
vt 0.365571 0.596692
vt 0.768557 0.595737
vt 0.596692 0.518769
vt 0.596692 0.624561
vt 0.768557 0.757079
vt 0.365571 0.372190
vt 0.365571 0.465735
vt 0.377171 0.465735
vt 0.377171 0.537695
vt 0.365571 0.537695
vt 0.365571 0.615534
vt 0.647106 0.757079
vt 0.647106 0.595737
vt 0.647106 0.467441
vt 0.647106 0.372190
vt 0.647106 0.518769
vt 0.365571 0.436559
vt 0.365571 0.483016
vt 0.647106 0.624561
vt 0.232329 0.372190
vt 0.232329 0.414386
vt 0.232329 0.471221
vt 0.232329 0.542695
vt 0.304750 0.537695
vt 0.304750 0.465735
vt 0.365571 0.399617
vt 0.365571 0.372190
vt 0.232329 0.372190
vt 0.232329 0.381591
vt 0.232329 0.596692
vt 0.232329 0.768557
vt 0.449593 0.537695
vt 0.449593 0.465735
vt 0.377171 0.465735
vt 0.377171 0.537695
vt 1.279093 0.465735
vt 1.279093 0.537695
vt 0.768557 0.537695
vt 0.768557 0.465735
vt 0.449593 1.351728
vt 0.449593 1.279093
vt 0.377171 1.279093
vt 0.377171 1.351728
vt 0.449593 0.465735
vt 0.449593 0.537695
vt 0.377171 0.537695
vt 0.377171 0.465735
vt 0.449593 1.279093
vt 0.449593 1.351728
vt 0.377171 1.351728
vt 0.377171 1.279093
vt 0.377171 0.768557
vt 0.365571 0.768557
vt 0.304750 0.768557
vt 0.304750 0.768557
vt 0.365571 0.768557
vt 0.377171 0.768557
vt 1.279093 0.537695
vt 1.279093 0.465735
vt 0.768557 0.465735
vt 0.768557 0.537695
vt 0.232329 0.394253
vt 0.232329 0.410177
vt 0.647106 0.372190
vt 0.647106 0.434646
vt 0.596692 0.434646
vt 0.451720 0.434646
vt 0.481348 0.518769
vt 0.768557 0.372190
vt 0.596692 0.372190
vt 0.768557 0.467441
vt 0.647106 0.427836
vt 0.365571 0.494173
vt 0.596692 0.399617
vt 0.596692 0.436559
vt 0.547686 0.436559
vt 0.518057 0.399617
vt 0.365571 0.596692
vt 0.647106 0.596692
vt 0.643142 0.481348
vt 0.369535 0.547686
vt 0.637352 0.434646
vt 0.363744 0.399617
vt 0.363744 0.436559
vt 0.637352 0.518769
vt 0.494173 0.436559
vt 0.494173 0.399617
vt 0.351067 0.481231
vt 0.624674 0.563441
vt 0.427836 0.434646
vt 0.427836 0.518769
vt 0.356858 0.518652
vt 0.630465 0.452314
vt 0.624674 0.430910
vt 0.351067 0.497247
vt 0.369535 0.436559
vt 0.643142 0.518769
vt 0.630465 0.563441
vt 0.356858 0.481231
vt 0.518652 0.481231
vt 0.497247 0.481231
vt 0.430910 0.563441
vt 0.452314 0.563441
vt 0.647106 0.372190
vt 0.365571 0.372190
vt 0.427836 0.372190
vt 0.596692 0.372190
vt 0.494173 0.372190
vt 0.057094 1.427836
vt -0.140454 1.427836
vt -0.140454 1.202985
vt 0.057094 1.202985
vt 0.057094 1.202985
vt 0.015066 1.250822
vt 0.015066 1.380000
vt 0.057094 1.427836
vt 0.057094 0.372190
vt 0.057094 0.422128
vt -0.140454 0.422128
vt -0.140454 0.372190
vt -0.140454 0.372190
vt -0.140454 0.422128
vt 0.057094 0.422128
vt 0.057094 0.372190
vt 1.202985 0.372190
vt 1.202985 0.422128
vt 1.427836 0.422128
vt 1.427836 0.372190
vt 1.427836 0.372190
vt 1.427836 0.422128
vt 1.202985 0.422128
vt 1.202985 0.372190
vt 0.015066 0.422128
vt 0.015066 0.437726
vt 0.015066 0.565705
vt 0.015066 0.877301
vt -0.098426 0.877301
vt -0.098426 0.422128
vt -0.140454 1.427836
vt -0.098426 1.380000
vt -0.098426 1.250822
vt -0.140454 1.202985
vt 0.015066 1.380000
vt 0.099087 1.401343
vt -0.182447 1.401343
vt -0.098426 1.380000
vt -0.098426 0.422128
vt -0.098426 0.877301
vt 0.015066 0.877301
vt 0.015066 0.565705
vt 0.015066 0.437726
vt 0.015066 0.422128
vt 1.250822 0.565705
vt 1.250822 0.877301
vt 1.380000 0.877301
vt 1.380000 0.565705
vt 1.380000 0.422128
vt 1.380000 0.877301
vt 1.250822 0.877301
vt 1.250822 0.422128
vt 1.250822 0.422128
vt 1.250822 0.437726
vt 1.380000 0.437726
vt 1.380000 0.422128
vt 1.279093 0.465735
vt 1.351728 0.465735
vt 0.159908 1.279093
vt 0.159908 1.351728
vt 1.351728 0.537695
vt 1.279093 0.537695
vt 1.279093 0.465735
vt 1.279093 0.537695
vt 1.351728 0.537695
vt 1.351728 0.465735
vt 0.159908 0.465735
vt 0.159908 0.537695
vt 0.159908 1.351728
vt 0.159908 1.279093
vt 0.159908 0.537695
vt 0.159908 0.465735
vt 0.099087 1.229478
vt -0.098426 1.250822
vt -0.182447 1.229478
vt 0.015066 1.250822
vt 0.099087 1.401343
vt 0.099087 1.229478
vt -0.182447 1.229478
vt -0.182447 1.401343
vt 1.401343 0.877301
vt 1.401343 1.238500
vt 1.229478 1.105982
vt 1.229478 0.877301
vt 0.099087 0.877301
vt 0.099087 1.096955
vt -0.182447 1.238500
vt -0.182447 0.877301
vt -0.182447 0.877301
vt -0.182447 1.105982
vt 0.099087 0.964437
vt 0.099087 0.877301
vt 1.229478 0.877301
vt 1.229478 0.891598
vt 1.401343 1.024115
vt 1.401343 0.877301
vt 0.099087 0.596692
vt 0.099087 0.768557
vt -0.182447 0.768557
vt -0.182447 0.596692
vt 0.099087 0.768557
vt 0.099087 0.596692
vt -0.182447 0.596692
vt -0.182447 0.768557
vt 0.768557 0.595737
vt 0.768557 0.757079
vt 0.596692 0.624561
vt 0.596692 0.518769
vt 0.099087 0.372190
vt -0.182447 0.372190
vt -0.182447 0.467441
vt -0.182447 0.595737
vt -0.182447 0.757079
vt 0.099087 0.615534
vt 0.099087 0.537695
vt 0.087487 0.537695
vt 0.087487 0.465735
vt 0.099087 0.465735
vt -0.182447 0.518769
vt -0.182447 0.624561
vt 0.099087 0.483016
vt 0.099087 0.436559
vt 0.596692 0.394253
vt 0.596692 0.410177
vt 0.768557 0.542695
vt 0.768557 0.471221
vt 0.159908 0.465735
vt 0.159908 0.537695
vt 0.099087 0.399617
vt 0.099087 0.372190
vt 0.015066 0.537695
vt 0.087487 0.537695
vt 0.087487 0.465735
vt 0.015066 0.465735
vt 1.279093 0.465735
vt 0.768557 0.465735
vt 0.768557 0.537695
vt 1.279093 0.537695
vt 0.015066 1.351728
vt 0.087487 1.351728
vt 0.087487 1.279093
vt 0.015066 1.279093
vt 0.015066 0.465735
vt 0.087487 0.465735
vt 0.087487 0.537695
vt 0.015066 0.537695
vt 0.015066 1.279093
vt 0.087487 1.279093
vt 0.087487 1.351728
vt 0.015066 1.351728
vt 0.159908 0.768557
vt 0.099087 0.768557
vt 0.087487 0.768557
vt 0.087487 0.768557
vt 0.099087 0.768557
vt 0.159908 0.768557
vt 1.279093 0.537695
vt 0.768557 0.537695
vt 0.768557 0.465735
vt 1.279093 0.465735
vt 0.596692 0.372190
vt 0.596692 0.381591
vt 0.768557 0.414386
vt 0.768557 0.372190
vt -0.182447 0.372190
vt -0.182447 0.434646
vt 0.481348 0.518769
vt 0.451720 0.434646
vt 0.596692 0.434646
vt 0.768557 0.372190
vt 0.768557 0.467441
vt 0.596692 0.372190
vt 0.099087 0.494173
vt -0.182447 0.427836
vt 0.596692 0.399617
vt 0.518057 0.399617
vt 0.547686 0.436559
vt 0.596692 0.436559
vt 0.099087 0.596692
vt 0.095124 0.547686
vt -0.178483 0.481348
vt -0.182447 0.596692
vt -0.172693 0.434646
vt -0.172693 0.518769
vt 0.100914 0.436559
vt 0.100914 0.399617
vt 0.494173 0.399617
vt 0.494173 0.436559
vt -0.160016 0.563441
vt 0.113592 0.481231
vt 0.427836 0.518769
vt 0.427836 0.434646
vt 0.107801 0.518652
vt 0.113592 0.497247
vt -0.160016 0.430910
vt -0.165806 0.452314
vt 0.095124 0.436559
vt 0.107801 0.481231
vt -0.165806 0.563441
vt -0.178483 0.518769
vt 0.497247 0.481231
vt 0.518652 0.481231
vt 0.452314 0.563441
vt 0.430910 0.563441
vt -0.182447 0.372190
vt 0.099087 0.372190
vt 0.427836 0.372190
vt 0.596692 0.372190
vt 0.494173 0.372190
vn 0.3422 0.8069 -0.4814
vn 0.8645 -0.0697 0.4978
vn -0.3422 -0.8069 0.4814
vn -0.8645 0.0697 -0.4978
vn -0.3681 0.5865 0.7214
vn 0.0000 1.0000 0.0000
vn -0.0000 -1.0000 0.0000
vn -0.2223 0.0000 -0.9750
vn 0.2223 -0.0000 0.9750
vn -0.9750 0.0000 0.2223
vn 0.9750 0.0000 -0.2223
vn -0.2364 -0.7379 0.6321
vn -0.2467 -0.7333 0.6335
vn 0.9813 -0.0054 -0.1925
vn -0.9590 -0.0248 0.2822
vn -0.2769 -0.9588 0.0631
vn -0.0137 -0.0000 0.9999
vn -0.9954 0.0592 0.0754
vn 0.9968 -0.0261 -0.0756
vn -0.2802 -0.9599 -0.0112
vn -0.1499 -0.5518 -0.8204
vn -0.9708 0.2297 0.0689
vn 0.9708 -0.2297 -0.0689
vn 0.0086 -0.0297 -0.9995
vn 0.9886 -0.1501 0.0135
vn 0.9771 -0.0341 -0.2099
vn 0.9667 0.0815 -0.2428
vn -0.9978 0.0646 -0.0136
vn 0.4871 -0.7379 0.4671
vn 0.4969 -0.7333 0.4640
vn -0.9677 -0.0054 0.2519
vn 0.9866 -0.0248 -0.1614
vn 0.2769 -0.9588 -0.0631
vn 0.4458 -0.0000 0.8951
vn 0.9297 0.0592 -0.3635
vn -0.9310 -0.0261 0.3640
vn 0.2476 -0.9599 -0.1316
vn -0.2205 -0.5518 -0.8043
vn 0.9047 0.2297 -0.3588
vn -0.9047 -0.2297 0.3588
vn -0.4410 -0.0297 -0.8970
vn -0.8850 -0.1501 0.4407
vn -0.9715 -0.0341 0.2345
vn -0.9763 0.0815 0.2003
vn 0.8933 0.0646 -0.4449
vn 0.3681 -0.5865 -0.7214
g wood_Cube.014_wood.001
usemtl wood.001
s off
f 13/9/7 9/10/7 10/11/7 14/12/7
f 14/13/8 10/14/8 12/15/8 15/16/8
f 15/17/9 12/18/9 11/19/9 16/20/9
f 16/21/10 11/22/10 9/23/10 13/24/10
f 11/25/11 12/26/11 19/27/11 20/28/11
f 10/29/11 9/30/11 17/31/11 18/32/11
f 9/30/11 11/25/11 20/28/11 17/31/11
f 12/26/11 10/29/11 18/32/11 19/27/11
f 23/33/12 24/34/12 22/35/12 21/36/12
f 25/37/13 28/38/13 32/39/13 29/40/13
f 23/41/14 21/42/14 27/43/14 28/44/14
f 22/45/15 24/46/15 25/47/15 26/48/15
f 24/49/16 23/50/16 28/51/16 25/52/16
f 21/53/17 22/54/17 26/55/17 27/56/17
f 32/57/14 31/58/14 35/59/14 36/60/14 37/61/14 38/62/14
f 27/63/13 26/64/13 30/65/13 31/66/13
f 28/38/13 27/63/13 31/66/13 32/39/13
f 26/64/13 25/37/13 29/40/13 30/65/13
f 36/67/12 35/68/12 47/69/12 48/70/12
f 30/71/15 29/72/15 39/73/15 40/74/15 33/75/15 34/76/15
f 40/77/16 37/78/16 36/79/16 33/80/16
f 31/81/17 30/82/17 34/83/17 35/84/17
f 29/85/16 32/86/16 38/87/16 39/88/16
f 39/88/16 38/87/16 42/89/16 43/90/16
f 63/91/12 62/92/12 120/93/12 121/94/12
f 37/78/16 40/77/16 44/95/16 41/96/16
f 40/77/16 39/88/16 43/90/16 44/95/16
f 38/87/16 37/78/16 41/96/16 42/89/16
f 62/97/14 66/98/14 119/99/14 120/100/14
f 66/101/13 68/102/13 122/103/13 119/104/13
f 68/105/15 63/106/15 121/107/15 122/108/15
f 45/109/12 48/70/12 131/110/12 132/111/12
f 34/112/12 33/113/12 45/109/12 46/114/12
f 33/113/12 36/67/12 48/70/12 45/109/12
f 35/68/12 34/112/12 46/114/12 47/69/12
f 52/115/18 51/116/18 50/117/18 49/118/18
f 47/119/17 46/120/17 50/121/17 51/122/17
f 48/123/14 47/124/14 51/125/14 52/126/14
f 46/127/15 45/128/15 49/129/15 50/130/15
f 48/123/14 52/126/14 133/131/14 131/132/14
f 49/129/15 45/128/15 132/133/15 134/134/15
f 52/115/19 49/118/19 134/135/19 133/136/19
f 53/137/12 54/138/12 55/139/12 56/140/12
f 53/137/12 56/140/12 143/141/12 144/142/12
f 60/143/18 59/144/18 58/145/18 57/146/18
f 79/147/17 78/148/17 58/149/17 59/150/17
f 56/151/15 71/152/15 69/153/15 70/154/15 72/155/15 60/156/15 59/157/15 79/158/15 80/159/15 55/160/15
f 78/161/15 75/162/15 57/163/15 58/164/15
f 56/151/15 143/165/15 167/166/15 168/167/15 145/168/15 60/156/15 72/155/15 73/169/15 74/170/15 71/152/15
f 76/171/15 53/172/15 144/173/15 170/174/15
f 60/143/19 57/146/19 146/175/19 145/176/19
f 44/177/15 43/178/15 64/179/15 67/180/15
f 63/181/16 68/182/16 73/183/16 74/184/16
f 41/185/13 44/186/13 67/187/13 65/188/13
f 65/188/13 67/187/13 68/102/13 66/101/13
f 42/189/14 41/190/14 65/191/14 61/192/14
f 61/192/14 65/191/14 66/98/14 62/97/14
f 43/193/12 42/194/12 61/195/12 64/196/12
f 64/196/12 61/195/12 62/92/12 63/91/12
f 68/102/13 67/187/13 70/197/13 72/198/13 73/199/13
f 64/196/12 63/91/12 74/200/12 71/201/12 69/202/12
f 67/203/17 64/204/17 69/205/17 70/206/17
f 57/163/15 75/162/15 169/207/15 146/208/15
f 75/162/15 76/171/15 170/174/15 169/207/15
f 54/209/15 53/172/15 76/171/15 77/210/15
f 78/148/20 77/211/20 83/212/20 84/213/20
f 55/214/17 54/215/17 77/211/17 80/216/17
f 80/216/17 77/211/17 78/148/17 79/147/17
f 53/137/13 54/138/13 94/217/13 93/218/13
f 76/219/21 75/220/21 81/221/21 82/222/21
f 75/223/22 78/224/22 84/225/22 81/226/22
f 87/227/23 86/228/23 85/229/23 88/230/23
f 82/222/24 81/221/24 85/231/24 86/232/24
f 88/230/23 85/229/23 91/233/23 92/234/23
f 84/213/25 83/212/25 87/235/25 88/236/25
f 89/237/26 90/238/26 92/239/26 91/240/26
f 81/241/27 84/242/27 90/243/27 89/244/27
f 85/231/28 81/221/28 89/245/28 91/246/28
f 84/213/29 88/236/29 92/247/29 90/248/29
f 94/249/30 87/227/30 86/228/30 93/250/30
f 87/235/31 83/212/31 94/251/31
f 54/215/32 94/251/32 83/212/32 77/211/32
f 53/252/33 93/253/33 82/222/33 76/219/33
f 86/232/34 93/253/34 82/222/34
f 97/254/12 95/255/12 96/256/12 98/257/12
f 99/258/13 103/259/13 106/260/13 102/261/13
f 97/262/14 102/263/14 101/264/14 95/265/14
f 96/266/15 100/267/15 99/268/15 98/269/15
f 98/270/17 99/271/17 102/272/17 97/273/17
f 95/274/16 101/275/16 100/276/16 96/277/16
f 106/278/14 112/279/14 111/280/14 110/281/14 109/282/14 105/283/14
f 101/284/13 105/285/13 104/286/13 100/287/13
f 102/261/13 106/260/13 105/285/13 101/284/13
f 100/287/13 104/286/13 103/259/13 99/258/13
f 110/288/12 126/289/12 125/290/12 109/291/12
f 104/292/15 108/293/15 107/294/15 114/295/15 113/296/15 103/297/15
f 114/298/17 107/299/17 110/300/17 111/301/17
f 105/302/16 109/303/16 108/304/16 104/305/16
f 103/306/17 113/307/17 112/308/17 106/309/17
f 113/307/17 117/310/17 116/311/17 112/308/17
f 149/312/12 121/94/12 120/93/12 148/313/12
f 111/301/17 115/314/17 118/315/17 114/298/17
f 114/298/17 118/315/17 117/310/17 113/307/17
f 112/308/17 116/311/17 115/314/17 111/301/17
f 121/316/17 122/317/17 119/318/17 120/319/17
f 148/320/14 120/100/14 119/99/14 152/321/14
f 152/322/13 119/104/13 122/103/13 154/323/13
f 154/324/15 122/108/15 121/107/15 149/325/15
f 123/326/12 132/111/12 131/110/12 126/289/12
f 108/327/12 124/328/12 123/326/12 107/329/12
f 107/329/12 123/326/12 126/289/12 110/288/12
f 109/291/12 125/290/12 124/328/12 108/327/12
f 130/330/35 127/331/35 128/332/35 129/333/35
f 125/334/16 129/335/16 128/336/16 124/337/16
f 126/338/14 130/339/14 129/340/14 125/341/14
f 124/342/15 128/343/15 127/344/15 123/345/15
f 132/346/17 134/347/17 133/348/17 131/349/17
f 126/338/14 131/132/14 133/131/14 130/339/14
f 127/344/15 134/134/15 132/133/15 123/345/15
f 130/330/36 133/136/36 134/135/36 127/331/36
f 135/350/12 138/351/12 137/352/12 136/353/12
f 135/350/12 144/142/12 143/141/12 138/351/12
f 142/354/35 139/355/35 140/356/35 141/357/35
f 165/358/16 141/359/16 140/360/16 164/361/16
f 138/362/15 137/363/15 166/364/15 165/365/15 141/366/15 142/367/15 158/368/15 156/369/15 155/370/15 157/371/15
f 164/372/15 140/373/15 139/374/15 161/375/15
f 169/376/17 146/377/17 145/378/17 168/379/17
f 138/362/15 157/371/15 160/380/15 159/381/15 158/368/15 142/367/15 145/168/15 168/167/15 167/166/15 143/165/15
f 162/382/15 170/174/15 144/173/15 135/383/15
f 142/354/36 145/176/36 146/175/36 139/355/36
f 118/384/15 153/385/15 150/386/15 117/387/15
f 149/388/17 160/389/17 159/390/17 154/391/17
f 115/392/13 151/393/13 153/394/13 118/395/13
f 151/393/13 152/322/13 154/323/13 153/394/13
f 116/396/14 147/397/14 151/398/14 115/399/14
f 147/397/14 148/320/14 152/321/14 151/398/14
f 117/400/12 150/401/12 147/402/12 116/403/12
f 150/401/12 149/312/12 148/313/12 147/402/12
f 154/323/13 159/404/13 158/405/13 156/406/13 153/394/13
f 150/401/12 155/407/12 157/408/12 160/409/12 149/312/12
f 153/410/16 156/411/16 155/412/16 150/413/16
f 139/374/15 146/208/15 169/207/15 161/375/15
f 161/375/15 169/207/15 170/174/15 162/382/15
f 144/414/17 170/415/17 167/416/17 143/417/17
f 170/415/17 169/376/17 168/379/17 167/416/17
f 136/418/15 163/419/15 162/382/15 135/383/15
f 164/361/37 174/420/37 173/421/37 163/422/37
f 137/423/16 166/424/16 163/422/16 136/425/16
f 166/424/16 165/358/16 164/361/16 163/422/16
f 135/350/13 183/426/13 184/427/13 136/353/13
f 162/428/38 172/429/38 171/430/38 161/431/38
f 161/432/39 171/433/39 174/434/39 164/435/39
f 177/436/40 178/437/40 175/438/40 176/439/40
f 172/429/41 176/440/41 175/441/41 171/430/41
f 178/437/40 182/442/40 181/443/40 175/438/40
f 174/420/42 178/444/42 177/445/42 173/421/42
f 179/446/43 181/447/43 182/448/43 180/449/43
f 171/450/44 179/451/44 180/452/44 174/453/44
f 175/441/45 181/454/45 179/455/45 171/430/45
f 174/420/46 180/456/46 182/457/46 178/444/46
f 184/458/47 183/459/47 176/439/47 177/436/47
f 177/445/48 184/460/48 173/421/48
f 136/425/49 163/422/49 173/421/49 184/460/49
f 135/461/50 162/428/50 172/429/50 183/462/50
f 176/440/51 172/429/51 183/462/51
f 16/20/52 13/9/52 14/13/52 15/17/52
f 17/31/11 20/28/11 19/27/11 18/32/11
o gold_Cube.015
v -0.273207 -0.398159 -0.360099
v -0.246248 -0.400332 -0.344577
v -0.252524 -0.415131 -0.335748
v -0.279483 -0.412958 -0.351270
v -0.192325 -0.481063 -0.444578
v -0.223545 -0.478547 -0.462554
v -0.243622 -0.399334 -0.344048
v -0.198996 -0.499335 -0.434146
v -0.250890 -0.416472 -0.333824
v -0.230216 -0.496819 -0.452121
v -0.282109 -0.413956 -0.351799
v -0.274841 -0.396818 -0.362023
v -0.244824 -0.499368 -0.220592
v -0.244824 -0.342933 -0.220592
v -0.316520 -0.499368 -0.081554
v -0.316520 -0.342933 -0.081554
v -0.383862 -0.499368 -0.292288
v -0.383862 -0.342933 -0.292288
v -0.455558 -0.499368 -0.153250
v -0.455558 -0.342933 -0.153250
v -0.290427 -0.342933 -0.206019
v -0.331093 -0.342933 -0.127157
v -0.409954 -0.342933 -0.167823
v -0.369289 -0.342933 -0.246684
v -0.290427 -0.316475 -0.206019
v -0.331093 -0.316475 -0.127157
v -0.409954 -0.316475 -0.167823
v -0.369289 -0.316475 -0.246684
v -0.316540 -0.316475 -0.197674
v -0.339437 -0.316475 -0.153270
v -0.383842 -0.316475 -0.176167
v -0.360945 -0.316475 -0.220572
v -0.316540 -0.332319 -0.197674
v -0.339437 -0.332319 -0.153270
v -0.383842 -0.332319 -0.176167
v -0.360945 -0.332319 -0.220572
v -0.316540 -0.425754 -0.197674
v -0.339437 -0.425754 -0.153270
v -0.383842 -0.425754 -0.176167
v -0.360945 -0.425754 -0.220572
vt 0.544569 0.575783
vt 0.544569 0.424217
vt 0.551613 0.412241
vt 0.551613 0.587759
vt 0.455431 0.424217
vt 0.455431 0.575783
vt 0.448387 0.587759
vt 0.448387 0.412241
vt 0.576208 0.000000
vt 0.576208 1.000000
vt 0.423792 1.000000
vt 0.423792 0.000000
vt 0.629579 0.000000
vt 0.629579 1.000000
vt 0.370421 1.000000
vt 0.370421 0.000000
vt 0.423792 0.000000
vt 0.423792 1.000000
vt 0.576208 1.000000
vt 0.576208 0.000000
vt 0.370421 0.000000
vt 0.370421 1.000000
vt 0.629579 1.000000
vt 0.629579 0.000000
vt 0.393131 0.671643
vt 0.606869 0.678412
vt 0.606869 0.328357
vt 0.393131 0.321588
vt 0.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.072331 0.927669
vt 0.927669 0.927669
vt 0.927669 0.072331
vt 0.072331 0.072331
vt 0.000000 0.000000
vt 0.216403 0.216403
vt 0.216403 0.783597
vt 0.000000 0.350907
vt 1.000000 0.350907
vt 1.000000 0.649093
vt 0.000000 0.649093
vt 1.000000 0.000000
vt 0.783597 0.216403
vt 0.783597 0.783597
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.781535 0.781535
vt 0.781535 0.218465
vt 1.000000 0.350907
vt 0.000000 0.350907
vt 0.000000 0.649093
vt 1.000000 0.649093
vt 0.000000 0.350907
vt 0.000000 0.649093
vt 1.000000 0.350907
vt 1.000000 0.649093
vt 1.000000 0.658562
vt 0.000000 0.658562
vt 0.000000 0.341438
vt 1.000000 0.341438
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.218465 0.218465
vt 0.218465 0.781535
vt 1.000000 0.658562
vt 1.000000 0.341438
vt 1.000000 0.658562
vt 0.000000 0.658562
vt 0.000000 0.341438
vt 1.000000 0.341438
vt 0.000000 0.658562
vt 0.000000 0.341438
vt 0.000000 0.341438
vt 1.000000 0.341438
vt 0.000000 0.341438
vt 0.000000 0.341438
vt 1.000000 0.341438
vt 1.000000 0.341438
vn -0.3681 0.5865 0.7214
vn -0.3681 0.5865 0.7215
vn -0.8690 0.0552 -0.4917
vn -0.3443 -0.8035 0.4856
vn 0.8690 -0.0552 0.4917
vn 0.3422 0.8069 -0.4814
vn 0.3793 -0.5593 -0.7371
vn 0.8888 0.0000 0.4583
vn -0.4583 -0.0000 0.8888
vn -0.8888 -0.0000 -0.4583
vn 0.4583 0.0000 -0.8888
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
g gold_Cube.015_gold
usemtl gold
s off
f 187/463/53 188/464/53 195/465/53 193/466/53
f 185/467/54 186/468/54 191/469/54 196/470/54
f 188/464/53 185/467/53 196/470/53 195/465/53
f 194/471/55 195/472/55 196/473/55 190/474/55
f 192/475/56 193/476/56 195/477/56 194/478/56
f 189/479/57 191/480/57 193/481/57 192/482/57
f 190/483/58 196/484/58 191/485/58 189/486/58
f 186/468/53 187/463/53 193/466/53 191/469/53
f 189/487/59 192/488/59 194/489/59 190/490/59
f 197/491/60 198/492/60 200/493/60 199/494/60
f 199/495/61 200/496/61 204/497/61 203/498/61
f 203/498/62 204/497/62 202/499/62 201/500/62
f 201/501/63 202/502/63 198/492/63 197/491/63
f 199/503/64 203/504/64 201/505/64 197/506/64
f 200/496/65 198/507/65 205/508/65 206/509/65
f 205/510/63 208/511/63 212/512/63 209/513/63
f 198/507/65 202/514/65 208/515/65 205/508/65
f 204/497/65 200/496/65 206/509/65 207/516/65
f 202/514/65 204/497/65 207/516/65 208/515/65
f 212/517/65 211/518/65 215/519/65 216/520/65
f 207/521/61 206/522/61 210/523/61 211/524/61
f 208/525/62 207/521/62 211/524/62 212/526/62
f 206/527/60 205/510/60 209/513/60 210/528/60
f 214/529/62 213/530/62 217/531/62 218/532/62
f 210/533/65 209/534/65 213/535/65 214/536/65
f 209/534/65 212/517/65 216/520/65 213/535/65
f 211/518/65 210/533/65 214/536/65 215/519/65
f 213/530/61 216/537/61 220/538/61 217/531/61
f 215/539/63 214/540/63 218/541/63 219/542/63
f 216/543/60 215/539/60 219/542/60 220/544/60
f 219/542/63 218/541/63 222/545/63 223/546/63
f 220/544/60 219/542/60 223/546/60 224/547/60
f 218/532/62 217/531/62 221/548/62 222/549/62
f 217/531/61 220/538/61 224/550/61 221/548/61
f 221/548/65 224/550/65 223/546/65 222/545/65
f 188/464/53 187/463/53 186/468/53 185/467/53
o steel_Cube.016
v -0.345859 -0.280020 -0.208026
v -0.326953 -0.281543 -0.197141
v -0.331354 -0.291921 -0.190950
v -0.350260 -0.290398 -0.201835
v -0.353622 -0.267651 -0.192812
v -0.334716 -0.269174 -0.181927
v -0.339118 -0.279552 -0.175735
v -0.358023 -0.278029 -0.186620
v -0.354893 -0.270648 -0.191024
v -0.335988 -0.272171 -0.180138
v -0.337846 -0.276555 -0.177523
v -0.356752 -0.275031 -0.188409
v -0.361055 -0.257837 -0.173929
v -0.346108 -0.259041 -0.165323
v -0.347967 -0.263424 -0.162708
v -0.362914 -0.262220 -0.171314
vt 0.753081 -0.031154
vt 0.246919 -0.031154
vt 0.246919 0.456970
vt 0.753081 0.456970
vt 0.351158 0.246919
vt 0.648842 0.246919
vt 0.562862 0.246919
vt 0.437138 0.246919
vt 0.351158 -0.031154
vt 0.648842 -0.031154
vt 0.648842 0.456970
vt 0.351158 0.456970
vt 0.648842 -0.031154
vt 0.351158 -0.031154
vt 0.351158 0.456970
vt 0.648842 0.456970
vt 0.246919 -0.031154
vt 0.753081 -0.031154
vt 0.753081 0.456970
vt 0.246919 0.456970
vt 0.246919 0.456970
vt 0.753081 0.456970
vt 0.700094 0.968846
vt 0.299906 0.968846
vt 0.648842 0.753081
vt 0.351158 0.753081
vt 0.437138 0.753081
vt 0.562862 0.753081
vt 0.562862 0.700094
vt 0.437138 0.700094
vt 0.437138 0.299906
vt 0.562862 0.299906
vt 0.753081 0.456970
vt 0.246919 0.456970
vt 0.299906 0.968846
vt 0.700094 0.968846
vt 0.437138 0.456970
vt 0.562862 0.456970
vt 0.562862 0.968846
vt 0.437138 0.968846
vt 0.562862 0.456970
vt 0.437138 0.456970
vt 0.437138 0.968846
vt 0.562862 0.968846
vn 0.3422 0.8069 -0.4814
vn 0.0000 0.7071 -0.7071
vn -0.8645 0.0697 -0.4978
vn 0.8645 -0.0697 0.4978
vn -0.3422 -0.8069 0.4814
vn 0.0000 -1.0000 0.0000
vn -0.3681 0.5865 0.7214
vn -0.8978 0.1297 -0.4208
vn 0.8220 -0.0089 0.5694
vn 0.3681 -0.5865 -0.7214
g steel_Cube.016_steel
usemtl steel
s off
f 226/551/66 225/552/66 229/553/66 230/554/66
f 229/555/67 232/556/67 236/557/67 233/558/67
f 225/559/68 228/560/68 232/561/68 229/562/68
f 227/563/69 226/564/69 230/565/69 231/566/69
f 228/567/70 227/568/70 231/569/70 232/570/70
f 236/571/70 235/572/70 239/573/70 240/574/70
f 231/575/71 230/576/71 234/577/71 235/578/71
f 232/556/72 231/575/72 235/578/72 236/557/72
f 230/576/72 229/555/72 233/558/72 234/577/72
f 239/579/72 238/580/72 237/581/72 240/582/72
f 234/583/66 233/584/66 237/585/66 238/586/66
f 233/587/73 236/588/73 240/589/73 237/590/73
f 235/591/74 234/592/74 238/593/74 239/594/74
f 225/559/75 226/564/75 227/568/75 228/560/75
o book_Cube.017
v 0.433852 -0.378962 -0.407961
v 0.566656 0.075573 0.174455
v 0.421077 -0.361852 -0.418401
v 0.553881 0.092683 0.164014
v 0.408630 -0.352919 -0.388531
v 0.532099 0.069664 0.152943
v -0.197414 -0.378962 -0.264017
v -0.064609 0.075573 0.318398
v 0.135629 -0.481882 -0.259637
v 0.268434 -0.027346 0.322778
v -0.190427 -0.361852 -0.278963
v -0.057623 0.092683 0.303452
v 0.265234 -0.008431 0.308745
v 0.132429 -0.462966 -0.273670
v -0.166263 -0.352919 -0.257442
v -0.042794 0.069664 0.284032
v 0.260566 -0.024407 0.288275
v 0.137097 -0.446990 -0.253199
v -0.022239 -0.497668 -0.023755
v -0.022239 -0.409943 -0.023755
v -0.108186 -0.497668 0.490735
v -0.108186 -0.409943 0.490735
v -0.407411 -0.497668 -0.088099
v -0.407411 -0.409943 -0.088099
v -0.493358 -0.497668 0.426391
v -0.493358 -0.409943 0.426391
v -0.022239 -0.475201 -0.023755
v -0.022239 -0.432410 -0.023755
v -0.108186 -0.432410 0.490735
v -0.108186 -0.475201 0.490735
v -0.493358 -0.432410 0.426391
v -0.493358 -0.475201 0.426391
v -0.407411 -0.432410 -0.088099
v -0.407411 -0.475201 -0.088099
v -0.130727 -0.497668 0.486632
v -0.130727 -0.409943 0.486632
v -0.044780 -0.497668 -0.027858
v -0.044780 -0.409943 -0.027858
v -0.044780 -0.475201 -0.027858
v -0.044780 -0.432410 -0.027858
v -0.130727 -0.475201 0.486632
v -0.130727 -0.432410 0.486632
v -0.475525 -0.432410 0.408332
v -0.475525 -0.475201 0.408332
v -0.396412 -0.432410 -0.065251
v -0.396412 -0.475201 -0.065251
v -0.127313 -0.475201 0.466191
v -0.127313 -0.432410 0.466191
v -0.048199 -0.475201 -0.007391
v -0.048199 -0.432410 -0.007391
v -0.065352 -0.409777 -0.061571
v -0.065352 -0.345480 -0.061571
v -0.059758 -0.409777 0.460018
v -0.059758 -0.345480 0.460018
v -0.455839 -0.409777 -0.057382
v -0.455839 -0.345480 -0.057382
v -0.450245 -0.409776 0.464207
v -0.450245 -0.345480 0.464207
v -0.065352 -0.393309 -0.061571
v -0.065352 -0.361947 -0.061571
v -0.059758 -0.361947 0.460018
v -0.059758 -0.393309 0.460018
v -0.450245 -0.361947 0.464207
v -0.450245 -0.393309 0.464207
v -0.455839 -0.361947 -0.057382
v -0.455839 -0.393309 -0.057382
v -0.082669 -0.409777 0.459931
v -0.082669 -0.345480 0.459931
v -0.088264 -0.409777 -0.061658
v -0.088264 -0.345480 -0.061658
v -0.088264 -0.393309 -0.061658
v -0.088264 -0.361947 -0.061658
v -0.082669 -0.393309 0.459931
v -0.082669 -0.361947 0.459931
v -0.435854 -0.361947 0.443301
v -0.435854 -0.393309 0.443301
v -0.441004 -0.361947 -0.036817
v -0.441004 -0.393309 -0.036817
v -0.082892 -0.393309 0.439209
v -0.082892 -0.361947 0.439209
v -0.088041 -0.393309 -0.040909
v -0.088041 -0.361947 -0.040909
vt 0.290580 0.000000
vt 0.708362 0.000000
vt 0.708362 0.035148
vt 0.315593 0.035148
vt 0.708362 1.000000
vt 0.290580 1.000000
vt 0.315593 0.964852
vt 0.708362 0.964852
vt 0.277079 1.000000
vt 0.708362 1.000000
vt 0.708362 0.000000
vt 0.277079 0.000000
vt 0.708362 0.395063
vt 0.708362 0.426728
vt 0.290580 0.595994
vt 0.277079 0.567352
vt 0.277079 0.567352
vt 0.290580 0.595994
vt 0.708362 0.426728
vt 0.708362 0.395063
vt 0.000000 0.567352
vt 0.000000 0.595994
vt 1.000000 0.595994
vt 1.000000 0.567352
vt 0.290580 0.000000
vt 0.315593 0.035148
vt 0.315593 0.964852
vt 0.290580 1.000000
vt 0.277079 1.000000
vt 0.277079 0.000000
vt 0.277079 0.567352
vt 0.290580 0.595994
vt 0.277079 0.567352
vt 0.290580 0.595994
vt 0.000000 0.567352
vt 1.000000 0.567352
vt 1.000000 0.595994
vt 0.000000 0.595994
vt -0.498724 0.540990
vt -0.498724 0.584036
vt 0.500638 0.584036
vt 0.500638 0.540990
vt 0.500000 0.540990
vt 0.500000 0.584036
vt 1.204279 0.584036
vt 1.204279 0.540990
vt 0.500638 0.540990
vt 0.500638 0.584036
vt -0.498724 0.584036
vt -0.498724 0.540990
vt 0.500000 0.540990
vt 0.500000 0.584036
vt 0.456108 0.584036
vt 0.456108 0.540990
vt 0.500000 0.500000
vt 1.204279 0.500638
vt 1.204279 -0.498724
vt 0.500000 -0.499362
vt 0.500000 0.500000
vt 0.456108 0.500638
vt 0.456108 -0.498724
vt 0.500000 -0.499362
vt 0.500000 0.415964
vt 0.500000 0.459010
vt 0.456108 0.459010
vt 0.456108 0.415964
vt 0.500638 0.415964
vt 0.500638 0.459010
vt -0.498724 0.459010
vt -0.498724 0.415964
vt 1.204279 -0.498724
vt 1.204279 0.500638
vt 1.176281 0.460883
vt 1.176281 -0.459020
vt 0.500000 0.415964
vt 0.500000 0.459010
vt 1.204279 0.459010
vt 1.204279 0.415964
vt 1.204279 -0.498724
vt 0.500000 -0.499362
vt 0.500000 -0.459607
vt 1.176281 -0.459020
vt -0.498724 0.415964
vt -0.498724 0.459010
vt 0.500638 0.459010
vt 0.500638 0.415964
vt 0.456108 0.459010
vt 0.456108 0.540990
vt 0.456108 0.415964
vt 0.500000 0.500000
vt 0.500000 0.460296
vt 1.204279 0.415964
vt 1.204279 0.459010
vt 1.204279 0.500638
vt 1.204279 -0.498724
vt 0.456108 0.500638
vt 0.456108 -0.498724
vt 1.204279 0.540990
vt 1.204279 0.584036
vt 0.456108 0.584036
vt -0.499362 0.540990
vt -0.499362 0.459010
vt -0.459607 0.459010
vt -0.459607 0.540990
vt 0.460296 0.540990
vt 0.460296 0.459010
vt 0.500000 0.500000
vt 1.204279 0.500638
vt 1.176281 0.460883
vt 0.500000 0.460296
vt 0.500000 -0.499362
vt 0.500000 -0.459607
vt -0.498724 0.540990
vt -0.498724 0.584036
vt 0.500638 0.584036
vt 0.500638 0.540990
vt 0.500000 0.540990
vt 0.500000 0.584036
vt 1.204279 0.584036
vt 1.204279 0.540990
vt 0.500638 0.540990
vt 0.500638 0.584036
vt -0.498724 0.584036
vt -0.498724 0.540990
vt 0.500000 0.540990
vt 0.500000 0.584036
vt 0.456108 0.584036
vt 0.456108 0.540990
vt 0.500000 0.500000
vt 1.204279 0.500638
vt 1.204279 -0.498724
vt 0.500000 -0.499362
vt 0.500000 0.500000
vt 0.456108 0.500638
vt 0.456108 -0.498724
vt 0.500000 -0.499362
vt 0.500000 0.415964
vt 0.500000 0.459010
vt 0.456108 0.459010
vt 0.456108 0.415964
vt 0.500638 0.415964
vt 0.500638 0.459010
vt -0.498724 0.459010
vt -0.498724 0.415964
vt 1.204279 -0.498724
vt 1.204279 0.500638
vt 1.176281 0.460883
vt 1.176281 -0.459020
vt 0.500000 0.415964
vt 0.500000 0.459010
vt 1.204279 0.459010
vt 1.204279 0.415964
vt 1.204279 -0.498724
vt 0.500000 -0.499362
vt 0.500000 -0.459607
vt 1.176281 -0.459020
vt -0.498724 0.415964
vt -0.498724 0.459010
vt 0.500638 0.459010
vt 0.500638 0.415964
vt 0.456108 0.459010
vt 0.456108 0.540990
vt 0.456108 0.415964
vt 0.500000 0.500000
vt 0.500000 0.460296
vt 1.204279 0.415964
vt 1.204279 0.459010
vt 1.204279 0.500638
vt 1.204279 -0.498724
vt 0.456108 0.500638
vt 0.456108 -0.498724
vt 1.204279 0.540990
vt 1.204279 0.584036
vt 0.456108 0.584036
vt -0.499362 0.540990
vt -0.499362 0.459010
vt -0.459607 0.459010
vt -0.459607 0.540990
vt 0.460296 0.540990
vt 0.460296 0.459010
vt 0.500000 0.500000
vt 1.204279 0.500638
vt 1.176281 0.460883
vt 0.500000 0.460296
vt 0.500000 -0.499362
vt 0.500000 -0.459607
vn -0.4853 0.7515 -0.4469
vn -0.4932 0.7243 -0.4818
vn 0.4867 -0.7390 0.4658
vn -0.1769 -0.6055 -0.7759
vn 0.1769 0.6055 0.7759
vn 0.8245 0.3393 -0.4528
vn -0.5375 0.7199 -0.4392
vn 0.2436 0.7516 -0.6131
vn 0.2356 0.7243 -0.6480
vn -0.2367 -0.7390 0.6307
vn 0.2379 0.7387 -0.6307
vn -0.9393 0.3393 -0.0506
vn 0.2939 0.7199 -0.6288
vn -0.4878 0.7387 -0.4652
vn 0.9863 0.0000 0.1648
vn -0.1639 -0.0000 0.9865
vn -0.9863 -0.0000 -0.1648
vn 0.1791 0.0000 -0.9838
vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 0.0000
vn -0.1791 0.0000 0.9838
vn 0.1639 0.0000 -0.9865
vn 0.9999 -0.0000 -0.0107
vn 0.0116 -0.0000 0.9999
vn -0.9999 0.0000 0.0107
vn 0.0038 0.0000 -1.0000
vn -0.0038 -0.0000 1.0000
vn -0.0116 -0.0000 -0.9999
g book_Cube.017_book
usemtl book
s off
f 243/595/76 254/596/76 258/597/76 245/598/76
f 253/599/77 244/600/77 246/601/77 257/602/77
f 242/603/78 250/604/78 249/605/78 241/606/78
f 249/607/79 254/608/79 243/609/79 241/610/79
f 242/611/80 244/612/80 253/613/80 250/614/80
f 241/615/81 243/616/81 244/617/81 242/618/81
f 244/600/82 243/595/82 245/598/82 246/601/82
f 251/619/83 255/620/83 258/597/83 254/596/83
f 253/599/84 257/602/84 256/621/84 252/622/84
f 248/623/85 247/624/85 249/605/85 250/604/85
f 249/607/79 247/625/79 251/626/79 254/608/79
f 257/602/86 258/597/86 255/620/86 256/621/86
f 248/627/80 250/614/80 253/613/80 252/628/80
f 247/629/87 248/630/87 252/631/87 251/632/87
f 252/622/88 256/621/88 255/620/88 251/619/88
f 258/597/89 257/602/89 246/601/89 245/598/89
f 268/633/90 260/634/90 262/635/90 269/636/90
f 282/637/91 276/638/91 266/639/91 271/640/91
f 271/641/92 266/642/92 264/643/92 273/644/92
f 280/645/93 278/646/93 260/647/93 268/648/93
f 275/649/94 265/650/94 263/651/94 277/652/94
f 276/653/95 262/654/95 260/655/95 278/656/95
f 277/657/93 279/658/93 267/659/93 259/660/93
f 279/658/93 280/645/93 268/648/93 267/659/93
f 265/661/92 272/662/92 274/663/92 263/664/92
f 274/665/95 272/666/95 284/667/95 286/668/95
f 275/669/91 281/670/91 272/671/91 265/672/91
f 273/673/94 280/674/94 290/675/94 285/676/94
f 259/677/90 267/678/90 270/679/90 261/680/90
f 267/678/90 268/633/90 269/636/90 270/679/90
f 270/681/96 269/682/96 282/637/96 281/670/96
f 261/683/96 270/681/96 281/670/96 275/669/96
f 272/666/95 281/684/95 287/685/95 284/667/95
f 263/686/97 274/687/97 279/658/97 277/657/97
f 266/688/95 276/653/95 278/656/95 264/689/95
f 261/690/94 275/649/94 277/652/94 259/691/94
f 273/692/97 264/693/97 278/646/97 280/645/97
f 269/682/96 262/694/96 276/638/96 282/637/96
f 280/695/92 279/696/92 289/697/92 290/698/92
f 281/670/92 282/637/92 288/699/92 287/700/92
f 282/701/94 271/702/94 283/703/94 288/704/94
f 271/702/94 273/673/94 285/676/94 283/703/94
f 279/705/95 274/665/95 286/668/95 289/706/95
f 300/707/98 292/708/98 294/709/98 301/710/98
f 314/711/99 308/712/99 298/713/99 303/714/99
f 303/715/100 298/716/100 296/717/100 305/718/100
f 312/719/101 310/720/101 292/721/101 300/722/101
f 307/723/94 297/724/94 295/725/94 309/726/94
f 308/727/95 294/728/95 292/729/95 310/730/95
f 309/731/101 311/732/101 299/733/101 291/734/101
f 311/732/101 312/719/101 300/722/101 299/733/101
f 297/735/100 304/736/100 306/737/100 295/738/100
f 306/739/95 304/740/95 316/741/95 318/742/95
f 307/743/99 313/744/99 304/745/99 297/746/99
f 305/747/94 312/748/94 322/749/94 317/750/94
f 291/751/98 299/752/98 302/753/98 293/754/98
f 299/752/98 300/707/98 301/710/98 302/753/98
f 302/755/102 301/756/102 314/711/102 313/744/102
f 293/757/102 302/755/102 313/744/102 307/743/102
f 304/740/95 313/758/95 319/759/95 316/741/95
f 295/760/103 306/761/103 311/732/103 309/731/103
f 298/762/95 308/727/95 310/730/95 296/763/95
f 293/764/94 307/723/94 309/726/94 291/765/94
f 305/766/103 296/767/103 310/720/103 312/719/103
f 301/756/102 294/768/102 308/712/102 314/711/102
f 312/769/100 311/770/100 321/771/100 322/772/100
f 313/744/100 314/711/100 320/773/100 319/774/100
f 314/775/94 303/776/94 315/777/94 320/778/94
f 303/776/94 305/747/94 317/750/94 315/777/94
f 311/779/95 306/739/95 318/742/95 321/780/95
f 317/750/94 322/749/94 320/778/94 315/777/94
f 318/742/95 316/741/95 319/759/95 321/780/95
f 319/759/100 320/778/100 322/772/100 321/780/100
f 287/700/92 288/699/92 290/698/92 289/697/92
f 286/668/95 284/667/95 287/700/95 289/706/95
f 285/676/94 290/675/94 288/699/94 283/703/94
o paper_Cube.018
v 0.408630 -0.351585 -0.388531
v 0.394118 -0.324203 -0.406592
v 0.517587 0.098380 0.134882
v 0.532099 0.070998 0.152943
v -0.166263 -0.351585 -0.257442
v -0.161014 -0.324203 -0.280009
v -0.037545 0.098380 0.261465
v 0.255629 0.006115 0.266622
v 0.132160 -0.416469 -0.274852
v -0.042794 0.070998 0.284032
v 0.260566 -0.023072 0.288275
v 0.137097 -0.445656 -0.253199
v -0.475525 -0.432410 0.408332
v -0.475525 -0.475201 0.408332
v -0.396412 -0.432410 -0.065251
v -0.396412 -0.475201 -0.065251
v -0.127313 -0.475201 0.466191
v -0.127313 -0.432410 0.466191
v -0.048199 -0.475201 -0.007391
v -0.048199 -0.432410 -0.007391
v -0.435854 -0.361947 0.443301
v -0.435854 -0.393309 0.443301
v -0.441004 -0.361947 -0.036817
v -0.441004 -0.393309 -0.036817
v -0.082892 -0.393309 0.439209
v -0.082892 -0.361947 0.439209
v -0.088041 -0.393309 -0.040909
v -0.088041 -0.361947 -0.040909
vt 0.000000 0.554134
vt 0.000000 0.603438
vt 1.000000 0.603438
vt 1.000000 0.554134
vt 0.284410 0.554134
vt 0.298932 0.603438
vt 0.706877 0.437305
vt 0.706877 0.384751
vt 0.706877 0.384751
vt 0.706877 0.437305
vt 0.298932 0.603438
vt 0.284410 0.554134
vt 0.298932 0.000000
vt 0.706877 0.000000
vt 0.706877 1.000000
vt 0.298932 1.000000
vt 0.000000 0.554134
vt 1.000000 0.554134
vt 1.000000 0.603438
vt 0.000000 0.603438
vt 0.284410 0.554134
vt 0.298932 0.603438
vt 1.000000 0.384751
vt 0.000000 0.384751
vt 0.000000 0.437305
vt 1.000000 0.437305
vt 0.284410 0.554134
vt 0.298932 0.603438
vt 0.298932 0.000000
vt 0.298932 1.000000
vt 0.460883 0.459010
vt 0.460883 0.540990
vt -0.459020 0.540990
vt -0.459020 0.459010
vt 0.500000 0.459010
vt 0.500000 0.540990
vt 1.176281 0.540990
vt 1.176281 0.459010
vt 1.176281 0.459010
vt 1.176281 0.540990
vt 0.500000 0.540990
vt 0.500000 0.459010
vt 0.460883 0.459010
vt 0.460883 0.540990
vt -0.459020 0.540990
vt -0.459020 0.459010
vt 0.500000 0.459010
vt 0.500000 0.540990
vt 1.176281 0.540990
vt 1.176281 0.459010
vt 1.176281 0.459010
vt 1.176281 0.540990
vt 0.500000 0.540990
vt 0.500000 0.459010
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vn 0.8972 0.2248 -0.3801
vn 0.1769 0.6055 0.7759
vn -0.1769 -0.6055 -0.7759
vn -0.4924 0.7370 -0.4629
vn -0.9733 0.2248 0.0465
vn 0.9750 0.0000 -0.2223
vn 0.2430 0.7370 -0.6306
vn -0.9863 0.0000 -0.1648
vn -0.1639 0.0000 0.9865
vn 0.1639 -0.0000 -0.9865
vn -0.9999 -0.0000 0.0107
vn 0.0116 0.0000 0.9999
vn -0.0116 -0.0000 -0.9999
vn 0.9999 -0.0000 -0.0107
vn 0.0000 -1.0000 -0.0000
vn 0.0000 1.0000 0.0000
vn 0.9863 -0.0000 0.1648
vn 0.4878 -0.7387 0.4652
vn -0.2379 -0.7387 0.6307
g paper_Cube.018_paper
usemtl paper
s off
f 323/781/104 324/782/104 325/783/104 326/784/104
f 326/785/105 325/786/105 330/787/105 333/788/105
f 334/789/106 331/790/106 324/791/106 323/792/106
f 324/793/107 331/794/107 330/795/107 325/796/107
f 327/797/108 332/798/108 329/799/108 328/800/108
f 332/801/105 333/788/105 330/787/105 329/802/105
f 333/803/109 334/804/109 331/805/109 330/806/109
f 334/789/106 327/807/106 328/808/106 331/790/106
f 328/809/110 329/810/110 330/795/110 331/794/110
f 336/811/111 335/812/111 337/813/111 338/814/111
f 339/815/112 340/816/112 335/817/112 336/818/112
f 338/819/113 337/820/113 342/821/113 341/822/113
f 344/823/114 343/824/114 345/825/114 346/826/114
f 347/827/115 348/828/115 343/829/115 344/830/115
f 346/831/116 345/832/116 350/833/116 349/834/116
f 347/827/117 349/834/117 350/833/117 348/828/117
f 346/831/118 349/834/118 347/827/118 344/830/118
f 345/832/119 343/829/119 348/828/119 350/833/119
f 338/819/118 341/822/118 339/815/118 336/818/118
f 337/820/119 335/817/119 340/816/119 342/821/119
f 339/815/120 341/822/120 342/821/120 340/816/120
f 334/804/121 323/781/121 326/785/121 333/803/121
f 333/835/122 332/836/122 327/837/122 334/838/122

Modified recipes.lua from [c312eb6c73] to [b5f23ba87a].



1
2
3
4
5
6
7
..
34
35
36
37
38
39
40












41
42
43
44
45
46
47
...
568
569
570
571
572
573
574





































































575
576
577
578
579
580
581


minetest.register_craft {
	type = "shapeless";
	recipe = {
		"group:water_bucket",
		"vessels:glass_bottle",
		"vessels:glass_bottle",
		"vessels:glass_bottle"
................................................................................
	output = "bucket:bucket_water";
	replacements = {
		{ "sorcery:potion_water", "vessels:glass_bottle" };
		{ "sorcery:potion_water", "vessels:glass_bottle" };
		{ "sorcery:potion_water", "vessels:glass_bottle" };
	};
}













--[[
minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mortar_pestle",
		"farming:sugar",
................................................................................
		{'default:steel_ingot','default:furnace','default:steel_ingot'};
	};
	replacements = {
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
	};
}






































































---- altar
minetest.register_craftitem('sorcery:candle', {
	-- TODO make candle node
	inventory_image = 'sorcery_candle.png';
	description = 'Votive Candle';
	groups = {
		candle = 1;
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
..
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
...
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
-- tweaks

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"group:water_bucket",
		"vessels:glass_bottle",
		"vessels:glass_bottle",
		"vessels:glass_bottle"
................................................................................
	output = "bucket:bucket_water";
	replacements = {
		{ "sorcery:potion_water", "vessels:glass_bottle" };
		{ "sorcery:potion_water", "vessels:glass_bottle" };
		{ "sorcery:potion_water", "vessels:glass_bottle" };
	};
}

minetest.register_craft {
	type = 'shapeless';
	recipe = {
		'group:scissors';
		'basic_materials:plastic_sheet';
	};
	output = 'basic_materials:plastic_strip 3';
	replacements = {
		{'group:scissors','group:scissors'};
	};
}

--[[
minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mortar_pestle",
		"farming:sugar",
................................................................................
		{'default:steel_ingot','default:furnace','default:steel_ingot'};
	};
	replacements = {
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
	};
}

---- writing
minetest.register_craftitem('sorcery:ink', {
	description = "Ink";
	inventory_image = "sorcery_ink_bottle.png";
	groups = { liquid = 1; ink = 1; }
})

minetest.register_craftitem('sorcery:erasure_fluid', {
	description = "Erasure Fluid";
	inventory_image = "sorcery_erasure_fluid_bottle.png";
	groups = { liquid = 1; sorcery_writingstand_operand = 1; }
})

minetest.register_craft {
	output = 'sorcery:ink';
	type = 'shapeless';
	recipe = {
		'sorcery:potion_water';
		'dye:black', 'dye:black', 'dye:black';
		'xdecor:honey';
		'basic_materials:oil_extract';
		'basic_materials:oil_extract';
	};
}

minetest.register_craft {
	output = 'sorcery:erasure_fluid 3';
	type = 'shapeless';
	recipe = {
		'sorcery:potion_water';
		'sorcery:potion_water';
		'sorcery:potion_water';
		'basic_materials:oil_extract';
		'sorcery:powder_aluminum';
		'sorcery:powder_tin';
	}
}

minetest.register_craft {
	output = 'sorcery:erasure_fluid 3';
	type = 'shapeless';
	recipe = {
		'vessels:glass_bottle';
		'vessels:glass_bottle';
		'vessels:glass_bottle';
		'bucket:bucket_water';
		'basic_materials:oil_extract';
		'sorcery:powder_aluminum';
		'sorcery:powder_tin';
	};
	replacements = {
		{'bucket:bucket_water','bucket:bucket_empty'};
	};
}
minetest.register_craft {
	output = 'sorcery:writing_stand';
	recipe = {
		{'screwdriver:screwdriver','default:book','default:gold_ingot'};
		{'sorcery:screw_steel','group:wood','sorcery:screw_steel'};
		{'group:wood','default:stick','group:wood'};
	};
	replacements = {
		{'screwdriver:screwdriver','screwdriver:screwdriver'};
	};
};

sorcery.data.register.infusion_leftover('sorcery:ink','vessels:glass_bottle')
sorcery.data.register.infusion_leftover('sorcery:erasure_fluid','vessels:glass_bottle')

---- altar
minetest.register_craftitem('sorcery:candle', {
	-- TODO make candle node
	inventory_image = 'sorcery_candle.png';
	description = 'Votive Candle';
	groups = {
		candle = 1;

Added textures/sorcery_erasure_fluid_bottle.png version [6cc2e06a0c].

cannot compute difference between binary files

Added textures/sorcery_ink_bottle.png version [9cd1cb7026].

cannot compute difference between binary files

Added textures/sorcery_pen.png version [dbab6605a4].

cannot compute difference between binary files

Added textures/sorcery_pen_nib.png version [20a8f60412].

cannot compute difference between binary files

Added textures/sorcery_scissors_aluminum.png version [2d37a11f3d].

cannot compute difference between binary files

Added textures/sorcery_scissors_bronze.png version [d1baf6e9c4].

cannot compute difference between binary files

Added textures/sorcery_scissors_iridium.png version [19c8d02f68].

cannot compute difference between binary files

Added textures/sorcery_scissors_steel.png version [4a46c3698e].

cannot compute difference between binary files

Added textures/sorcery_scissors_tungsten.png version [b8529839fc].

cannot compute difference between binary files

Added textures/sorcery_ui_ghost_ink_bottle.png version [7c2f6ae8df].

cannot compute difference between binary files

Added textures/sorcery_ui_ghost_pen.png version [35aabc24b3].

cannot compute difference between binary files

Added textures/sorcery_ui_inkwell.png version [abb71778a3].

cannot compute difference between binary files

Added textures/sorcery_ui_inkwell_bar.png version [619704ff57].

cannot compute difference between binary files

Added textures/sorcery_ui_inkwell_bar_black.png version [790e8f3039].

cannot compute difference between binary files

Added textures/sorcery_ui_pg_next.png version [6be954ccbc].

cannot compute difference between binary files

Modified wands.lua from [54442c247e] to [a570130d91].

695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
...
791
792
793
794
795
796
797





798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817

local register_station = function(water)
	local tilebase = {
		"default_aspen_wood.png";
		"sorcery_wandworking_station_side.png";
	}
	local base = {
		description = "Wandworking station";
		groups = {
			choppy = 2;
		};
		paramtype2 = 'facedir';
		on_construct = function(pos)
			local meta = minetest.get_meta(pos)
			local inv = meta:get_inventory()
................................................................................
			elseif list == 'wandparts' then
				if wwi:is_empty('preview') then update_wand(wwi)
				else update_preview(wwi) end
			elseif list == 'tank' then
				minetest.get_node_timer(pos):start(1)
			end
		end;





	}

	local id
	if water then
		id = 'sorcery:wandworking_station_water'
		base = u.tbl.merge(base, {
			description = "Wandworking station (full)";
			tiles = u.tbl.append({"sorcery_wandworking_station_top_water.png"}, tilebase)
		})
	else
		id = 'sorcery:wandworking_station'
		base = u.tbl.merge(base, {
			description = "Wandworking station";
			drop = "sorcery:wandworking_station";
			tiles = u.tbl.append({"sorcery_wandworking_station_top.png"}, tilebase)
		})
	end
	minetest.register_node(id, base)
end








|







 







>
>
>
>
>






|





|







695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
...
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822

local register_station = function(water)
	local tilebase = {
		"default_aspen_wood.png";
		"sorcery_wandworking_station_side.png";
	}
	local base = {
		description = "Wandworking Station";
		groups = {
			choppy = 2;
		};
		paramtype2 = 'facedir';
		on_construct = function(pos)
			local meta = minetest.get_meta(pos)
			local inv = meta:get_inventory()
................................................................................
			elseif list == 'wandparts' then
				if wwi:is_empty('preview') then update_wand(wwi)
				else update_preview(wwi) end
			elseif list == 'tank' then
				minetest.get_node_timer(pos):start(1)
			end
		end;
		_sorcery = {
			recipe = {
				note = 'Construct wands from tree blocks and gems; fill with water and soak wands with philters to enchant them';
			};
		};
	}

	local id
	if water then
		id = 'sorcery:wandworking_station_water'
		base = u.tbl.merge(base, {
			description = "Wandworking Station (full)";
			tiles = u.tbl.append({"sorcery_wandworking_station_top_water.png"}, tilebase)
		})
	else
		id = 'sorcery:wandworking_station'
		base = u.tbl.merge(base, {
			description = "Wandworking Station";
			drop = "sorcery:wandworking_station";
			tiles = u.tbl.append({"sorcery_wandworking_station_top.png"}, tilebase)
		})
	end
	minetest.register_node(id, base)
end

Modified writing.lua from [d9df5661ad] to [324c6534ec].

3
4
5
6
7
8
9









10
11
12
13
14
15
16
..
59
60
61
62
63
64
65
















































































































































































































































































































































































































































































-- making them appear as by an "unknown author", by smudging out
-- the byline with black dye. it also allows written books to be
-- soaked in a bucket of water to wash out the ink and return
-- them to a virginal, unwritten state. finally, it makes it so
-- that when a book (or any owned item, for that matter) is
-- copied, the owner of the new copy is set to the user who
-- copied it, allowing users to collaborate on books.










local paperburn = function(item,value)
	minetest.register_craft { type = 'fuel', recipe = item, burntime = 3 * value }
	minetest.register_craft {
		type = 'cooking';
		recipe = item;
		output = 'sorcery:ash ' .. tostring(value);
................................................................................
			meta:set_string('owner','unknown author')
			meta:set_string('description','"'..meta:get_string('title')..'"')
			pinv:set_stack('craft',book_idx,ItemStack())
		end
	end
	return itemstack
end)























































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
-- making them appear as by an "unknown author", by smudging out
-- the byline with black dye. it also allows written books to be
-- soaked in a bucket of water to wash out the ink and return
-- them to a virginal, unwritten state. finally, it makes it so
-- that when a book (or any owned item, for that matter) is
-- copied, the owner of the new copy is set to the user who
-- copied it, allowing users to collaborate on books.

local constants = {
	ops_per_pen_level = 15;
	ops_per_ink_bottle = 8;
	cuts_per_scissor_hardness = 10;
	op_cost_retitle = 1;
	op_cost_copy_rec = 2;
	op_cost_insert_rec = 2;
};

local paperburn = function(item,value)
	minetest.register_craft { type = 'fuel', recipe = item, burntime = 3 * value }
	minetest.register_craft {
		type = 'cooking';
		recipe = item;
		output = 'sorcery:ash ' .. tostring(value);
................................................................................
			meta:set_string('owner','unknown author')
			meta:set_string('description','"'..meta:get_string('title')..'"')
			pinv:set_stack('craft',book_idx,ItemStack())
		end
	end
	return itemstack
end)

do
	local penbase = sorcery.lib.image('sorcery_pen.png')
	local pennib = sorcery.lib.image('sorcery_pen_nib.png')
	for name,metal in pairs(sorcery.data.metals) do
		if not metal.no_tools then
			local nib if name ~= 'steel' then
				nib = pennib:multiply(sorcery.lib.color(metal.tone):brighten(1.3))
			else nib = pennib end
			local cc if metal.hardness < 4 then cc = 3
				elseif metal.hardness < 7 then cc = 4
				else cc = 5 end
			local id = 'sorcery:pen_' .. name
			minetest.register_tool(id, {
				description = sorcery.lib.str.capitalize(name) .. ' Pen';
				inventory_image = penbase:blit(nib):render();
				groups = { pen = 1; sorcery_pen = 1; crafttool = cc };
				_sorcery = {
					material = {
						metal = true, grindvalue = 1;
						id = name, data = metal;
					};
				};
			})
			minetest.register_craft {
				output = id;
				recipe = {
					{'sorcery:fragment_gold','sorcery:fragment_copper'};
					{'default:stick',''};
					{metal.parts.fragment,''};
				};
			}
		end
	end
end

for _,name in pairs {
	'bronze', 'steel', 'aluminum', 'tungsten', 'iridium'
} do -- :/
	local metal = sorcery.data.metals[name]
	local id = 'sorcery:scissors_' .. name
	minetest.register_tool(id, {
		description = sorcery.lib.str.capitalize(name) .. ' Scissors';
		inventory_image = 'sorcery_scissors_' .. name .. '.png';
		groups = { crafttool = metal.hardness * 15; scissors = 1 };
		tool_capabilities = {
			full_punch_interval = 1.5;
			max_drop_level = metal.maxlevel or metal.level;
			groupcaps = {
				snappy = {
					uses = math.floor(metal.durability * 0.10);
					leveldiff = 1;
					maxlevel = metal.maxlevel or metal.level;
					times = {
						[1] = 3 / metal.speed;
						[2] = 2 / metal.speed;
						[3] = 1 / metal.speed;
					};
				};
			};
			damage_groups = { fleshy = 1; };
		};
		_sorcery = {
			material = {
				metal = true, data = metal, name = name;
				grindvalue = 3;
			};
			recipe = {
				note = "An editor's best friend";
			};
		};
	})
	local frag = metal.parts.fragment;
	local screw = metal.parts.screw;
	local ingot = metal.parts.ingot;
	minetest.register_craft {
		output = id;
		recipe = {
			{frag,'screwdriver:screwdriver',frag};
			{'basic_materials:plastic_strip',screw,'basic_materials:plastic_strip'};
			{ingot,'',ingot};
		};
		replacements = {
			{'screwdriver:screwdriver', 'screwdriver:screwdriver'};
		};
	}
end

-- the writing stand node allows books to be modified
-- in more complex ways than just inserting pages

local ws_props = function(pos)
	local meta = minetest.get_meta(pos)
	local inv = meta:get_inventory()
	local reservoir = meta:get_int('inkwell')
	local inkstack = inv:get_stack('ink',1)
	local inkbottles = 0
	if minetest.get_item_group(inkstack:get_name(),'ink') ~= 0 then
		inkbottles = inkstack:get_count()
	end
	local penstack = inv:get_stack('pen',1)
	local penstr if not penstack:is_empty() then
		penstr = penstack:get_definition()._sorcery.material.data.hardness * constants.ops_per_pen_level
	end
	local operstack = inv:get_stack('operand',1)
	local mode if not operstack:is_empty() then
		if operstack:get_name() == 'sorcery:erasure_fluid' then
			mode = 'delete';
		elseif operstack:get_name() == 'sorcery:recipe' then
			mode = 'insert';
		elseif operstack:get_name() == 'default:paper' then
			mode = 'copy';
		elseif minetest.get_item_group(operstack:get_name(), 'scissors') ~= 0 then
			mode = 'cut';
		end
	end
	return {
		meta = meta;
		inv = inv;
		haspen = not penstack:is_empty();
		hasink = not inkstack:is_empty();
		inkwell = reservoir, penstr = penstr;
		mode = mode;
		inkstack = inkstack, penstack = penstack;
		operstack = operstack;
		totalink = reservoir + inkbottles * constants.ops_per_ink_bottle;
	}
end
local ws_formspec = function(pos)
	local props = ws_props(pos)
	local meta = props.meta
	local inv = props.inv
	local base = [[
		formspec_version[3] size[10.25,10.5]
		real_coordinates[true]

		list[context;subject;0.25,0.25;1,1;]
		list[context;pen;0.25,1.50;1,1;]
		list[context;ink;0.25,2.75;1,1;]

		list[context;operand;9,0.25;1,1;]
		image[9,1.50;1,1;sorcery_ui_inkwell.png]
		list[context;output;9,2.75;1,1;]

		list[current_player;main;0.25,5.5;8,4;]

		listring[context;output]
		listring[current_player;main] listring[context;subject]
		listring[current_player;main] listring[context;pen]
		listring[current_player;main] listring[context;ink]
		listring[current_player;main] listring[context;operand]
		listring[current_player;main]
	]]
	local mkbtn = function(x,y,tex,name,presstex)
		tex = 'sorcery_ui_' .. tex
		if presstex then
			presstex = 'sorcery_ui_' .. presstex
		else presstex = tex end
		return string.format('image_button[' ..
			'%f,%f;' ..
			'1,1;' ..
			'%s;%s;;' ..
			'false;false;%s' ..
		']',x,y,tex,name,presstex)
	end

	local form = base
	local subj = inv:get_stack('subject',1)

	if subj:is_empty() then
		form = form .. 'image[0.25,0.25;1,1;default_bookshelf_slot.png]'
	end
	if props.penstack:is_empty() then
		form = form .. 'image[0.25,1.50;1,1;sorcery_ui_ghost_pen.png]'
	end
	if props.inkstack:is_empty() then
		form = form .. 'image[0.25,2.75;1,1;sorcery_ui_ghost_ink_bottle.png]'
	end

	if props.inkwell > 0 then
		form = form .. string.format(
			'image[8.8,1.50;0.5,0.5;sorcery_ui_inkwell_bar.png^[lowpart:%u:sorcery_ui_inkwell_bar_black.png]', 

			math.min(100,math.ceil((props.inkwell / constants.ops_per_ink_bottle) * 100))
		)
	end
	
	if subj:get_name() == 'sorcery:cookbook' then
		local book = sorcery.cookbook.get(subj)
		local bm = subj:get_meta()
		local rpp = sorcery.cookbook.constants.recipes_per_cookbook_page
		local page = bm:contains("pagenr") and bm:get_int("pagenr") or 1
		local lastpage = math.ceil(#book.pages / rpp)

		if page > 1 then form = form .. mkbtn(0.25,4,'pg_next.png^[transformFX','prevpage') end
		if page < lastpage then form = form .. mkbtn(9.00,4,'pg_next.png','nextpage'); end

		local desctext = minetest.formspec_escape(bm:get_string('description'))
		if props.haspen and props.totalink >= constants.op_cost_retitle then
			form = form .. string.format([[
				field[1.75,0.25;7,1;title;;%s]
				field_close_on_enter[title;false]
			]], desctext)
		else
			form = form .. string.format([[
				label[1.75,0.75;%s]
			]], desctext)
		end

		local mode = props.mode
		local modecolors = {
			delete = {255,127,127};
			cut    = {255,127,64};
			insert = {127,255,127};
			copy   = {127,127,255};
		}

		for i=1,rpp do
			local chap = rpp * (page-1) + i
			local rec = book.pages[chap]
			if rec == nil then break end
			local text = sorcery.cookbook.recfn(rec.kind,'title')(rec.name)
			local class = sorcery.cookbook.classes[rec.kind]

			local id = 'recipe_' .. tostring(i)
			local height = 1.50 + 1.25*(i-1)
			local img if class.icon then
				img = class.icon(rec.name)
			end
			local mcolor = sorcery.lib.color(modecolors[mode] or {255,255,255})
			form = form .. string.format([[
				style[%s;border=%s;textcolor=%s]
				style[%s:hovered;textcolor=#ffffff]
				style[%s:pressed;content_offset=0,0;textcolor=%s]
				button[1.75,%f;7,1;%s;%u. %s]
				%s[1.80,%f;0.90,0.90;%s]
			]], id, mode and 'true' or 'false',
				mode and mcolor:brighten(1.2):hex() or mcolor:hex(),
				id, id, mcolor:hex(),
				height, id, chap,
				minetest.formspec_escape(text),
				img and 'image' or 'item_image',
				height + 0.05, img or rec.name
			)
		end
	end
		
	meta:set_string('formspec',form)
end

local wsbox = {
	type = 'fixed';
	fixed = {
		-0.5, -0.5, -0.43;
		 0.5,  0.05, 0.43;
	};
}

minetest.register_node('sorcery:writing_stand', {
	description = 'Writing Stand';
	drawtype = 'mesh';
	mesh = 'sorcery-writing-stand.obj';
	sunlight_propagates = true;
	paramtype = 'light';
	paramtype2 = 'facedir';
	collision_box = wsbox;
	selection_box = wsbox;
	after_dig_node = sorcery.lib.node.purge_container;
	tiles = {
		'default_obsidian.png';
		'default_wood.png';
		'default_gold_block.png';
		'default_steel_block.png';
		'default_desert_stone.png';
		'default_cloud.png';
	};
	groups = {
		choppy = 2, oddly_breakable_by_hand = 2;
		sorcery_tech = 1;
		flammable = 2;
	};
	on_construct = function(pos)
		local meta = minetest.get_meta(pos)
		local inv = meta:get_inventory()
		
		meta:set_string('infotext','Writing Stand')
		inv:set_size('subject',1)
		inv:set_size('ink',1)
		inv:set_size('pen',1)
		inv:set_size('operand',1)
		inv:set_size('output',1)

		ws_formspec(pos)
	end;

	on_metadata_inventory_put = ws_formspec;
	on_metadata_inventory_take = ws_formspec;
	on_metadata_inventory_move = ws_formspec;

	on_receive_fields = function(pos,fname,fields,user)
		local p = ws_props(pos)
		local subj = p.inv:get_stack('subject',1)
		local changed = false
		local charge_ink = function(val)
			if p.totalink < val then return false end
			if p.inkwell >= val then
				p.inkwell = p.inkwell - val
			else
				local bottles = math.ceil(val / constants.ops_per_ink_bottle)
				local inkbtls = p.inkstack:get_count()
				p.inkstack:take_item(bottles)
				local empties = ItemStack {
					name = 'vessels:glass_bottle';
					count = bottles;
				}
				if p.inkstack:is_empty() then
					p.inkstack = empties
				else
					local r = user:get_inventory():add_item('main',empties)
					if not r:is_empty() then
						minetest.add_item(pos,r)
					end
				end
				p.inkwell = (p.inkwell + bottles*constants.ops_per_ink_bottle) - val
				p.totalink = p.inkwell + (inkbtls-bottles)*constants.ops_per_ink_bottle
			end
			p.penstack:add_wear(math.ceil((65535 / p.penstr) * val))
			changed = true
			return true
		end
		if subj:is_empty() then return nil end
		if subj:get_name() == 'sorcery:cookbook' then
			local bm = subj:get_meta()
			local book = sorcery.cookbook.get(subj)

			-- handle page change request
			if fields.nextpage or fields.prevpage then
				local page = math.max(1,bm:get_int('pagenr'))
				if     fields.nextpage then page = page + 1
				elseif fields.prevpage then page = page - 1 end
				bm:set_int('pagenr',math.max(1,page))
				changed = true
			end

			-- handle retitle request
			if fields.title then
				if fields.title ~= bm:get_string('description') then
					if charge_ink(constants.op_cost_retitle) then
						bm:set_string('description',fields.title)
					end
				end
			end

			-- handle editing request
			local rpp = sorcery.cookbook.constants.recipes_per_cookbook_page 
			if p.mode then for idx=1,rpp do
				if fields['recipe_' .. tostring(idx)] then
					local recnr = (bm:get_int('pagenr')-1)*rpp + idx
					local rec = book.pages[recnr]
					local bookchanged = false 
					if p.mode == 'delete' then
						p.operstack:take_item(1)
						table.remove(book.pages,recnr)
						bookchanged = true
					elseif p.mode == 'copy' and
						charge_ink(constants.op_cost_copy_rec) then
						local recipe = ItemStack('sorcery:recipe')
						sorcery.cookbook.setrecipe(recipe,rec.kind,rec.name)
						if p.operstack:get_count() == 1 then
							p.operstack = recipe
						else
							p.operstack:take_item(1)
							minetest.add_item(pos, user:get_inventory():add_item('main',recipe))
						end
						changed = true
					elseif p.mode == 'insert' then
						local rm = p.operstack:get_meta()
						if not rm:contains('recipe_kind') then
							sorcery.cookbook.setrecipe(p.operstack)
						end
						table.insert(book.pages,recnr,{
							kind = rm:get_string('recipe_kind');
							name = rm:get_string('recipe_name');
						})
						-- insertion can operate in one of two modes: copying
						-- the recipe into the book, or inserting the paper
						-- directly. if there is no ink available, we use the
						-- latter mode. in effect, this means deleting the
						-- recipe item is insufficient ink is available.
						if charge_ink(constants.op_cost_insert_rec) == false then
							p.operstack = ItemStack(nil)
						end
						bookchanged = true
					elseif p.mode == 'cut' then
						local spr = p.operstack:get_definition()._sorcery
						local sch = (spr and spr.material and spr.material.data.hardness) or 2
						local suses = sch * constants.cuts_per_scissor_hardness
						local dmg = 65535 / suses

						local cutrec = ItemStack('sorcery:recipe')
						sorcery.cookbook.setrecipe(cutrec,rec.kind,rec.name)
						table.remove(book.pages,recnr)
						minetest.add_item(pos, user:get_inventory():add_item('main', p.inv:add_item('output', cutrec)))

						p.operstack:add_wear(dmg)
						bookchanged = true
					end
					if bookchanged then
						sorcery.cookbook.set(subj, book)
						changed = true
					end
					break
				end
			end end
		end

		if changed then
			p.inv:set_stack('subject',1,subj)
			p.inv:set_stack('ink',1,p.inkstack)
			p.inv:set_stack('pen',1,p.penstack)
			p.inv:set_stack('operand',1,p.operstack)
			p.meta:set_int('inkwell',p.inkwell)
			ws_formspec(pos)
		end
	end;

	allow_metadata_inventory_put = function(pos,list,index,stack,user)
		local matchgrp = function(grp)
			return minetest.get_item_group(stack:get_name(), grp) ~= 0
		end
		local allowgroups = function(groups)
			for g,c in pairs(groups) do
				if matchgrp(g) then
					if c==0 then return stack:get_count()
						else return c end
				end
			end
			return 0
		end
		if list == 'subject' then
			return allowgroups{book=1,paper=1}
		elseif list == 'ink' then
			return allowgroups{ink=0}
		elseif list == 'pen' then
			return allowgroups{sorcery_pen=1}
		elseif list == 'operand' then
			-- TODO restrict to meaningful operands
			return stack:get_count()
			-- return allowgroups{book=0,paper=0,ink=0,...}
		end
		return 0
	end;
	allow_metadata_inventory_move = function(pos,fl,fi,tl,ti,ct,user)
		-- TODO this is lazy, defuckulate
		if tl == 'operand' then return ct end
		return 0
	end;

	_sorcery = {
		recipe = {
			note = 'Edit manuals, copy their chapters, splice them together, or cut them apart';
		};
	};
})