| | |
| | | minetest.register_tool("technic:sonic_screwdriver", { |
| | | description = S("Sonic Screwdriver"), |
| | | inventory_image = "technic_sonic_screwdriver.png", |
| | | wear_represents = "technic_RE_charge", |
| | | on_refill = technic.refill_RE_charge, |
| | | on_use = function(itemstack, user, pointed_thing) |
| | | -- Must be pointing to facedir applicable node |
| | | if pointed_thing.type ~= "node" then |
| | |
| | | if not meta1 or not meta1.charge then |
| | | return |
| | | end |
| | | if meta1.charge - 100 > 0 then |
| | | if meta1.charge >= 100 then |
| | | minetest.sound_play("technic_sonic_screwdriver", |
| | | {pos = pos, gain = 0.3, max_hear_distance = 10}) |
| | | local p = node.param2 |
| | |
| | | minetest.register_craft({ |
| | | output = "technic:sonic_screwdriver", |
| | | recipe = { |
| | | {"default:diamond"}, |
| | | {"technic:battery"}, |
| | | {"technic:stainless_steel_ingot"} |
| | | {"", "default:diamond", ""}, |
| | | {"mesecons_materials:fiber", "technic:battery", "mesecons_materials:fiber"}, |
| | | {"mesecons_materials:fiber", "moreores:mithril_ingot", "mesecons_materials:fiber"} |
| | | } |
| | | }) |
| | | |