458
459
460
461
462
463
464
465
466
467
468
469
470
471
...
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
|
minetest.show_formspec(user:get_player_name(), 'sorcery:recipe', string.format([[
size[%f,%f]
container[1,1] %s container_end[]
]], w + 4,h + 2,
spec))
return itemstack
end;
})
dungeon_loot.register {
name = 'sorcery:recipe';
chance = 0.9;
count = {1,7};
}
................................................................................
minetest.register_craft {
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;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
...
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
|
minetest.show_formspec(user:get_player_name(), 'sorcery:recipe', string.format([[
size[%f,%f]
container[1,1] %s container_end[]
]], w + 4,h + 2,
spec))
return itemstack
end;
_sorcery = {
material = {
powder = 'sorcery:pulp_inky';
grindvalue = 2; hardness = 1;
};
};
})
dungeon_loot.register {
name = 'sorcery:recipe';
chance = 0.9;
count = {1,7};
}
................................................................................
minetest.register_craft {
type = 'shapeless';
recipe = {
'sorcery:cookbook';
'default:book';
};
output = 'sorcery:cookbook';
_sorcery = {
material = {
powder = 'sorcery:pulp_inky';
grindvalue = 2*3; hardness = 1;
};
};
};
-- erase cookbooks in the usual way
minetest.register_craft {
type = 'shapeless';
recipe = {
'sorcery:cookbook';
'bucket:bucket_water';
'sorcery:erasure_fluid';
};
output = 'default:book';
replacements = {
{'bucket:bucket_water','bucket:bucket_empty'};
{'sorcery:erasure_fluid', 'vessels:glass_bottle'};
};
};
local m = sorcery.lib.marshal
local encbook, decbook = m.transcoder {
pages = m.g.array(8, m.g.struct {
kind = m.t.str;
|