| | |
| | | minetest.register_craft({ |
| | | output = 'technic:mining_drill', |
| | | recipe = { |
| | | {'technic:stainless_steel_ingot', 'technic:diamond_drill_head', 'technic:stainless_steel_ingot'}, |
| | | {'technic:stainless_steel_ingot', 'technic:motor', 'technic:stainless_steel_ingot'}, |
| | | {'', 'technic:red_energy_crystal', 'moreores:copper_ingot'}, |
| | | {'technic:stainless_steel_ingot', 'technic:diamond_drill_head', 'technic:stainless_steel_ingot'}, |
| | | {'technic:stainless_steel_ingot', 'technic:motor', 'technic:stainless_steel_ingot'}, |
| | | {'', 'technic:red_energy_crystal', 'moreores:copper_ingot'}, |
| | | } |
| | | }) |
| | | minetest.register_craft({ |
| | | output = 'technic:mining_drill_mk2', |
| | | recipe = { |
| | | {'technic:diamond_drill_head', 'technic:diamond_drill_head', 'technic:diamond_drill_head'}, |
| | | {'technic:stainless_steel_ingot', 'technic:mining_drill', 'technic:stainless_steel_ingot'}, |
| | | {'', 'technic:green_energy_crystal', ''}, |
| | | {'technic:diamond_drill_head', 'technic:diamond_drill_head', 'technic:diamond_drill_head'}, |
| | | {'technic:stainless_steel_ingot', 'technic:mining_drill', 'technic:stainless_steel_ingot'}, |
| | | {'', 'technic:green_energy_crystal', ''}, |
| | | } |
| | | }) |
| | | minetest.register_craft({ |
| | | output = 'technic:mining_drill_mk3', |
| | | recipe = { |
| | | {'technic:diamond_drill_head', 'technic:diamond_drill_head', 'technic:diamond_drill_head'}, |
| | | {'technic:stainless_steel_ingot', 'technic:mining_drill_mk2', 'technic:stainless_steel_ingot'}, |
| | | {'', 'technic:blue_energy_crystal', ''}, |
| | | {'technic:diamond_drill_head', 'technic:diamond_drill_head', 'technic:diamond_drill_head'}, |
| | | {'technic:stainless_steel_ingot', 'technic:mining_drill_mk2', 'technic:stainless_steel_ingot'}, |
| | | {'', 'technic:blue_energy_crystal', ''}, |
| | | } |
| | | }) |
| | | |
| | |
| | | stack_max = 1, |
| | | on_use = function(itemstack, user, pointed_thing) |
| | | if pointed_thing.type=="node" then |
| | | item=itemstack:to_table() |
| | | local item=itemstack:to_table() |
| | | local meta=get_item_meta(item["metadata"]) |
| | | if meta==nil then return end --tool not charghed |
| | | if meta["charge"]==nil then return end |
| | | charge=meta["charge"] |
| | | local charge=meta["charge"] |
| | | if charge-mining_drill_power_usage>0 then |
| | | charge_to_take=drill_dig_it(minetest.get_pointed_thing_position(pointed_thing, above),user,1,1) |
| | | charge =charge-mining_drill_power_usage; |
| | |
| | | local keys=user:get_player_control() |
| | | local player_name=user:get_player_name() |
| | | local item=itemstack:to_table() |
| | | meta=get_item_meta(item["metadata"]) |
| | | local meta=get_item_meta(item["metadata"]) |
| | | if meta==nil or keys["sneak"]==true then return mining_drill_mk2_setmode(user,itemstack) end |
| | | if meta["mode"]==nil then return mining_drill_mk2_setmode(user,itemstack) end |
| | | if pointed_thing.type~="node" then return end |
| | |
| | | local keys=user:get_player_control() |
| | | local player_name=user:get_player_name() |
| | | local item=itemstack:to_table() |
| | | meta=get_item_meta(item["metadata"]) |
| | | local meta=get_item_meta(item["metadata"]) |
| | | if meta==nil or keys["sneak"]==true then return mining_drill_mk3_setmode(user,itemstack) end |
| | | if meta["mode"]==nil then return mining_drill_mk3_setmode(user,itemstack) end |
| | | if pointed_thing.type~="node" then return end |
| | | if meta["charge"]==nil then return end |
| | | charge=meta["charge"] |
| | | local charge=meta["charge"] |
| | | if charge-mining_drill_power_usage>0 then |
| | | print(dump(meta)) |
| | | local charge_to_take=drill_dig_it(minetest.get_pointed_thing_position(pointed_thing, above),user,3,meta["mode"]) |
| | | charge=charge-charge_to_take; |
| | | if charge<0 then charge=0 end |