mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-27 03:10:29 +01:00
commit
fc7a23f8b1
@ -138,6 +138,13 @@ if( minetest.get_modpath("growing_cactus") ~= nil ) then
|
|||||||
timber_nodenames["growing_cactus:branch_xx"] = true
|
timber_nodenames["growing_cactus:branch_xx"] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Support farming_plus if it is there
|
||||||
|
if( minetest.get_modpath("farming_plus") ~= nil ) then
|
||||||
|
if chainsaw_leaves == true then
|
||||||
|
timber_nodenames["farming_plus:cocoa_leaves"] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Table for saving what was sawed down
|
-- Table for saving what was sawed down
|
||||||
local produced
|
local produced
|
||||||
|
|
||||||
@ -145,6 +152,9 @@ local produced
|
|||||||
chainsaw_dig_it = function(pos, player,current_charge)
|
chainsaw_dig_it = function(pos, player,current_charge)
|
||||||
local remaining_charge=current_charge
|
local remaining_charge=current_charge
|
||||||
|
|
||||||
|
-- Save the currently installed dropping mechanism so we can restore it.
|
||||||
|
local original_handle_node_drops = minetest.handle_node_drops
|
||||||
|
|
||||||
-- A bit of trickery here: use a different node drop callback
|
-- A bit of trickery here: use a different node drop callback
|
||||||
-- and restore the original afterwards.
|
-- and restore the original afterwards.
|
||||||
minetest.handle_node_drops = chainsaw_handle_node_drops
|
minetest.handle_node_drops = chainsaw_handle_node_drops
|
||||||
@ -195,9 +205,6 @@ chainsaw_handle_node_drops = function(pos, drops, digger)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Save the currently installed dropping mechanism so we can restore it.
|
|
||||||
local original_handle_node_drops = minetest.handle_node_drops
|
|
||||||
|
|
||||||
-- This function does all the hard work. Recursively we dig the node at hand
|
-- This function does all the hard work. Recursively we dig the node at hand
|
||||||
-- if it is in the table and then search the surroundings for more stuff to dig.
|
-- if it is in the table and then search the surroundings for more stuff to dig.
|
||||||
recursive_dig = function(pos, remaining_charge, player)
|
recursive_dig = function(pos, remaining_charge, player)
|
||||||
|
Loading…
Reference in New Issue
Block a user