231
232
233
234
235
236
237
238
239
240
241
242
243
244
...
412
413
414
415
416
417
418
419
420
421
422
423
424
425
|
mesh = 'sorcery-enchanter.obj';
paramtype = 'light';
paramtype2 = 'facedir';
groups = { cracky = 2, oddly_breakable_by_hand = 2 };
sunlight_propagates = true;
selection_box = hitbox;
collision_box = hitbox;
tiles = {
"default_obsidian.png";
"default_steel_block.png";
"default_bronze_block.png";
"default_junglewood.png";
"default_gold_block.png";
};
................................................................................
if ench.energy == 0 then
ench.spells = {}
sorcery.enchant.set(tool,ench)
else
sorcery.enchant.set(tool,ench,true)
end
puncher:set_wielded_item(tool)
end)
minetest.register_chatcommand('enchants', {
description = 'Log information about the currently held object\'s enchantment';
privs = { server = true };
func = function(caller,params)
local tool = minetest.get_player_by_name(caller):get_wielded_item()
|
|
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
|
mesh = 'sorcery-enchanter.obj';
paramtype = 'light';
paramtype2 = 'facedir';
groups = { cracky = 2, oddly_breakable_by_hand = 2 };
sunlight_propagates = true;
selection_box = hitbox;
collision_box = hitbox;
after_dig_node = sorcery.lib.node.purge_container;
tiles = {
"default_obsidian.png";
"default_steel_block.png";
"default_bronze_block.png";
"default_junglewood.png";
"default_gold_block.png";
};
................................................................................
if ench.energy == 0 then
ench.spells = {}
sorcery.enchant.set(tool,ench)
else
sorcery.enchant.set(tool,ench,true)
end
puncher:set_wielded_item(tool)
-- perform leyline checks and call notify if necessary
if minetest.get_item_group(node.name, 'sorcery_ley_device') ~= 0 then
for _,p in pairs(sorcery.ley.txofs) do
local sum = vector.add(pos,p)
if minetest.get_item_group(minetest.get_node(sum).name, 'sorcery_ley_device') ~= 0 then
sorcery.ley.notify(sum)
end
end
end
end)
minetest.register_chatcommand('enchants', {
description = 'Log information about the currently held object\'s enchantment';
privs = { server = true };
func = function(caller,params)
local tool = minetest.get_player_by_name(caller):get_wielded_item()
|