Added a lock to the tool node destroyer to prevent the stone block from being destroyed. This need was removed from stone generation if a sieve-type mod is used on the server.
Some checks failed
luacheck / luacheck (push) Has been cancelled
Some checks failed
luacheck / luacheck (push) Has been cancelled
This commit is contained in:
parent
fa610bebe3
commit
5c9695e242
@ -32,6 +32,7 @@ local settings = {
|
|||||||
use_real_entities = true,
|
use_real_entities = true,
|
||||||
entity_update_interval = 0,
|
entity_update_interval = 0,
|
||||||
enable_vertical_digilines_connectivity = true,
|
enable_vertical_digilines_connectivity = true,
|
||||||
|
enable_node_destroyer_from_tool = true,
|
||||||
enable_debug = false,
|
enable_debug = false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -365,7 +365,7 @@ local move_entities_globalstep_part2 = function(dtime)
|
|||||||
if object or entity.owner ~= nil then
|
if object or entity.owner ~= nil then
|
||||||
--minetest.chat_send_all("online: " .. dump(entity.owner))
|
--minetest.chat_send_all("online: " .. dump(entity.owner))
|
||||||
if pipeworks.enable_debug then
|
if pipeworks.enable_debug then
|
||||||
minetest.log("action", "pipeworks: активная передача по трубам игрок в сети: " .. entity.owner)
|
minetest.log("action", "pipeworks: активная передача по трубам игрок в сети: " .. dump(entity.owner))
|
||||||
end
|
end
|
||||||
|
|
||||||
local master = entity._attached_entities_master
|
local master = entity._attached_entities_master
|
||||||
|
@ -101,4 +101,8 @@ pipeworks_log_teleport_tubes (Log Teleport Tubes) bool false
|
|||||||
# Set it to noop if you wish to disable that behavior.
|
# Set it to noop if you wish to disable that behavior.
|
||||||
pipeworks_lua_tube_print_behavior (Behavior of print in Lua Tube) enum log log,noop
|
pipeworks_lua_tube_print_behavior (Behavior of print in Lua Tube) enum log log,noop
|
||||||
|
|
||||||
|
#Disconnect node destroyer from tool
|
||||||
|
pipeworks_enable_node_destroyer_from_tool = true
|
||||||
|
|
||||||
pipeworks_enable_debug (Enable debug) bool false
|
pipeworks_enable_debug (Enable debug) bool false
|
||||||
|
|
||||||
|
@ -261,6 +261,14 @@ if pipeworks.enable_node_breaker then
|
|||||||
end
|
end
|
||||||
-- Check if the tool can dig the node
|
-- Check if the tool can dig the node
|
||||||
local tool = stack:get_tool_capabilities()
|
local tool = stack:get_tool_capabilities()
|
||||||
|
if pipeworks.enable_debug then
|
||||||
|
minetest.log("action", "pipeworks: tool: " .. dump(tool))
|
||||||
|
end
|
||||||
|
|
||||||
|
if tool.punch_attack_uses > 0 and pipeworks.enable_node_destroyer_from_tool == false then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if not minetest.get_dig_params(node_def.groups, tool).diggable then
|
if not minetest.get_dig_params(node_def.groups, tool).diggable then
|
||||||
-- Try using hand if tool can't dig the node
|
-- Try using hand if tool can't dig the node
|
||||||
local hand = ItemStack():get_tool_capabilities()
|
local hand = ItemStack():get_tool_capabilities()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user