391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
...
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
...
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
...
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
|
end;
_proto = {
wood = wood;
};
groups = {
sorcery_wand_stand = 1;
choppy = 2;
oddly_breakable_by_hand = 2;
};
}
minetest.register_node(name, u.tbl.merge(auto,extra))
end
local rack_update = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
................................................................................
'default_diamond_block.png';
'default_copper_block.png';
'default_pine_wood.png';
'default_junglewood.png';
};
selection_box = hitbox;
collision_box = hitbox;
use_texture_alpha = true;
after_dig_node = sorcery.lib.node.purge_container;
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size('wands',10)
rack_update(pos)
end;
................................................................................
on_metadata_inventory_move = rack_update;
on_metadata_inventory_take = rack_update;
on_metadata_inventory_put = rack_update;
_proto = { wood = wood; };
groups = {
sorcery_wand_rack = 1;
choppy = 2;
oddly_breakable_by_hand = 2;
};
}
minetest.register_node(name, rack)
end
for woodname, wood in pairs(sorcery.wands.materials.wood) do
local blank = u.image('sorcery_transparent.png'); -- haaaaack
local name = 'sorcery:wand_stand_' .. woodname
................................................................................
minetest.add_item(pos, stack)
end
end;
groups = {
not_in_creative_inventory = 1;
sorcery_wand_stand = 1;
choppy = 2;
oddly_breakable_by_hand = 2;
};
on_rightclick = function(pos,node,user,stack)
local meta = minetest.get_meta(pos)
local stand = meta:get_inventory()
local wand = stand:get_stack('wand',1)
if stack:is_empty() then
stack = wand
|
|
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
...
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
...
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
...
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
|
end;
_proto = {
wood = wood;
};
groups = {
sorcery_wand_stand = 1;
choppy = 2;
dig_immediate = 2;
};
}
minetest.register_node(name, u.tbl.merge(auto,extra))
end
local rack_update = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
................................................................................
'default_diamond_block.png';
'default_copper_block.png';
'default_pine_wood.png';
'default_junglewood.png';
};
selection_box = hitbox;
collision_box = hitbox;
use_texture_alpha = 'blend';
after_dig_node = sorcery.lib.node.purge_container;
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size('wands',10)
rack_update(pos)
end;
................................................................................
on_metadata_inventory_move = rack_update;
on_metadata_inventory_take = rack_update;
on_metadata_inventory_put = rack_update;
_proto = { wood = wood; };
groups = {
sorcery_wand_rack = 1;
choppy = 2;
dig_immediate = 2;
};
}
minetest.register_node(name, rack)
end
for woodname, wood in pairs(sorcery.wands.materials.wood) do
local blank = u.image('sorcery_transparent.png'); -- haaaaack
local name = 'sorcery:wand_stand_' .. woodname
................................................................................
minetest.add_item(pos, stack)
end
end;
groups = {
not_in_creative_inventory = 1;
sorcery_wand_stand = 1;
choppy = 2;
dig_immediate = 2;
};
on_rightclick = function(pos,node,user,stack)
local meta = minetest.get_meta(pos)
local stand = meta:get_inventory()
local wand = stand:get_stack('wand',1)
if stack:is_empty() then
stack = wand
|