mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-04-30 05:01:41 -04:00
[WIP] Move in_deg_up to start and end of function
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
parent
0b006fccf9
commit
5ae2b04d72
1 changed files with 6 additions and 8 deletions
|
@ -305,20 +305,18 @@ function default.dig_up(pos, node, digger, max_height)
|
|||
if digger == nil then return end
|
||||
max_height = max_height or 100
|
||||
|
||||
in_dig_up = true
|
||||
for y = pos.y + 1, pos.y + max_height do
|
||||
local up_pos = vector.new(pos.x, y, pos.z)
|
||||
local up_node = minetest.get_node(up_pos)
|
||||
if up_node.name == node.name then
|
||||
in_dig_up = true
|
||||
if up_node.name ~= node.name then
|
||||
break
|
||||
end
|
||||
if not minetest.dig_node(up_pos, digger) then
|
||||
in_dig_up = false
|
||||
break
|
||||
end
|
||||
in_dig_up = false
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
in_dig_up = false
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue