mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-13 05:50:41 +01:00
support more nodes to be chainsawn (including additions of default and moretrees)
This commit is contained in:
parent
4ac36e9d27
commit
c949b5d239
|
@ -14,11 +14,13 @@ local timber_nodenames = {
|
|||
["default:cactus"] = true,
|
||||
["default:tree"] = true,
|
||||
["default:apple"] = true,
|
||||
["default:pine"] = true,
|
||||
}
|
||||
|
||||
if chainsaw_leaves then
|
||||
timber_nodenames["default:leaves"] = true
|
||||
timber_nodenames["default:jungleleaves"] = true
|
||||
timber_nodenames["default:pine_needles"] = true
|
||||
end
|
||||
|
||||
-- technic_worldgen defines rubber trees if moretrees isn't installed
|
||||
|
@ -33,6 +35,8 @@ end
|
|||
|
||||
-- Support moretrees if it is there
|
||||
if minetest.get_modpath("moretrees") then
|
||||
timber_nodenames["moretrees:acacia_tree_trunk"] = true
|
||||
timber_nodenames["moretrees:acacia_tree_trunk_sideways"] = true
|
||||
timber_nodenames["moretrees:apple_tree_trunk"] = true
|
||||
timber_nodenames["moretrees:apple_tree_trunk_sideways"] = true
|
||||
timber_nodenames["moretrees:beech_trunk"] = true
|
||||
|
@ -59,6 +63,7 @@ if minetest.get_modpath("moretrees") then
|
|||
timber_nodenames["moretrees:jungletree_trunk_sideways"] = true
|
||||
|
||||
if chainsaw_leaves then
|
||||
timber_nodenames["moretrees:acacia_leaves"] = true
|
||||
timber_nodenames["moretrees:apple_tree_leaves"] = true
|
||||
timber_nodenames["moretrees:oak_leaves"] = true
|
||||
timber_nodenames["moretrees:fir_leaves"] = true
|
||||
|
@ -127,7 +132,10 @@ end
|
|||
-- Support farming_plus
|
||||
if minetest.get_modpath("farming_plus") then
|
||||
if chainsaw_leaves then
|
||||
timber_nodenames["farming_plus:cocoa_leaves"] = true
|
||||
timber_nodenames["farming_plus:banana_leaves"] = true
|
||||
timber_nodenames["farming_plus:banana"] = true
|
||||
timber_nodenames["farming_plus:cocoa_leaves"] = true
|
||||
timber_nodenames["farming_plus:cocoa"] = true
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -138,6 +146,22 @@ if minetest.get_modpath("nature") then
|
|||
end
|
||||
end
|
||||
|
||||
-- Support snow
|
||||
if minetest.get_modpath("snow") then
|
||||
if chainsaw_leaves then
|
||||
timber_nodenames["snow:needles"] = true
|
||||
timber_nodenames["snow:needles_decorated"] = true
|
||||
timber_nodenames["snow:star"] = true
|
||||
end
|
||||
end
|
||||
|
||||
-- Support vines (also generated by moretrees if available)
|
||||
if minetest.get_modpath("vines") then
|
||||
if chainsaw_leaves then
|
||||
timber_nodenames["vines:vines"] = true
|
||||
end
|
||||
end
|
||||
|
||||
local S = technic.getter
|
||||
|
||||
technic.register_power_tool("technic:chainsaw", chainsaw_max_charge)
|
||||
|
|
Loading…
Reference in New Issue
Block a user