| | |
| | | minetest.register_craft({ |
| | | output = 'technic:laser_mk1', |
| | | recipe = { |
| | | {'default:diamond', 'default:steel_ingot', 'technic:red_energy_crystal'}, |
| | | {'', 'default:steel_ingot', 'default:steel_ingot'}, |
| | | {'', '', 'default:copper_ingot'}, |
| | | {'default:diamond', 'technic:brass_ingot', 'default:obsidian_glass'}, |
| | | {'', 'technic:brass_ingot', 'technic:red_energy_crystal'}, |
| | | {'', '', 'default:copper_ingot'}, |
| | | } |
| | | }) |
| | | minetest.register_craft({ |
| | | output = 'technic:laser_mk2', |
| | | recipe = { |
| | | {'default:diamond', 'default:steel_ingot', 'technic:laser_mk1'}, |
| | | {'', 'default:steel_ingot', 'technic:green_energy_crystal'}, |
| | | {'', '', 'default:copper_ingot'}, |
| | | {'default:diamond', 'technic:carbon_steel_ingot', 'technic:laser_mk1'}, |
| | | {'', 'technic:carbon_steel_ingot', 'technic:green_energy_crystal'}, |
| | | {'', '', 'default:copper_ingot'}, |
| | | } |
| | | }) |
| | | minetest.register_craft({ |
| | | output = 'technic:laser_mk3', |
| | | recipe = { |
| | | {'default:diamond', 'default:steel_ingot', 'technic:laser_mk2'}, |
| | | {'', 'default:steel_ingot', 'technic:blue_energy_crystal'}, |
| | | {'', '', 'default:copper_ingot'}, |
| | | {'default:diamond', 'technic:carbon_steel_ingot', 'technic:laser_mk2'}, |
| | | {'', 'technic:carbon_steel_ingot', 'technic:blue_energy_crystal'}, |
| | | {'', '', 'default:copper_ingot'}, |
| | | } |
| | | }) |
| | | |
| | |
| | | end |
| | | |
| | | local function laser_node(pos, player) |
| | | if minetest.is_protected(pos, player:get_player_name()) then |
| | | minetest.record_protection_violation(pos, player:get_player_name()) |
| | | return |
| | | end |
| | | local node = minetest.get_node(pos) |
| | | if node.name == "air" |
| | | or node.name == "ignore" |
| | | or node.name == "default:lava_source" |
| | | or node.name == "default:lava_flowing" then |
| | | return |
| | | end |
| | | if minetest.is_protected(pos, player:get_player_name()) then |
| | | minetest.record_protection_violation(pos, player:get_player_name()) |
| | | return |
| | | end |
| | | if node.name == "default:water_source" |
| | |
| | | local t_dir = get_used_dir(dir) |
| | | local dir_typ = t_dir[1] |
| | | if t_dir[3] == "+" then |
| | | f_tab = {0, range} |
| | | f_tab = {1, range} |
| | | else |
| | | f_tab = {-range,0} |
| | | f_tab = {-range, -1} |
| | | end |
| | | local d_ch = t_dir[2] |
| | | if dir_typ == "x" then |
| | |
| | | inventory_image = "technic_mining_laser_mk"..m[1]..".png", |
| | | stack_max = 1, |
| | | wear_represents = "technic_RE_charge", |
| | | on_refill = technic.refill_RE_charge, |
| | | on_use = function(itemstack, user) |
| | | local meta = minetest.deserialize(itemstack:get_metadata()) |
| | | if not meta or not meta.charge then |