Skip to content

Commit

Permalink
quarry can not dig some nodes
Browse files Browse the repository at this point in the history
- mcl_core:bedrock
- mcl_core:barrier
- df_underworld_items:slade
- df_underworld_items:slade_brick
- df_underworld_items:slade_wall
- df_underworld_items:slade_sand
- df_underworld_items:slade_block
- df_underworld_items:slade_seal
  • Loading branch information
nonfreegithub committed Oct 25, 2023
1 parent d6288e9 commit 8c29c58
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions technic/machines/HV/quarry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ local quarry_time_limit = technic.config:get_int("quarry_time_limit")
local quarry_demand = 10000
local network_time_limit = 30000

technic.unbreakable_nodes = {
"mcl_core:bedrock",
"mcl_core:barrier",
"df_underworld_items:slade",
"df_underworld_items:slade_brick",
"df_underworld_items:slade_wall",
"df_underworld_items:slade_sand",
"df_underworld_items:slade_block",
"df_underworld_items:slade_seal",
}

local infotext
do
local name = S("@1 Quarry", S("HV"))
Expand Down Expand Up @@ -81,6 +92,11 @@ local function can_dig_node(pos, dig_pos, node_name, owner, digger)
if not def or not def.diggable or (def.can_dig and not def.can_dig(dig_pos, digger)) then
return false
end
for _, v in pairs(technic.unbreakable_nodes) do
if node_name == v then
return false
end
end
return not minetest.is_protected(dig_pos, owner)
end

Expand Down

0 comments on commit 8c29c58

Please sign in to comment.