mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Generalize dig_by_water group to support group:water
This commit is contained in:
parent
4d78052851
commit
d8e8842a7a
1 changed files with 4 additions and 2 deletions
|
@ -101,7 +101,8 @@ minetest.register_abm({
|
|||
for zp=-1,1 do
|
||||
local p = {x=pos.x+xp, y=pos.y, z=pos.z+zp}
|
||||
local n = minetest.get_node(p)
|
||||
if (n.name=="mcl_core:water_flowing") then
|
||||
local d = minetest.registered_nodes[n.name]
|
||||
if (d.groups.water and d.liquidtype == "flowing") then
|
||||
drop_attached_node(pos)
|
||||
minetest.dig_node(pos)
|
||||
break
|
||||
|
@ -111,7 +112,8 @@ minetest.register_abm({
|
|||
for yp=-1,1 do
|
||||
local p = {x=pos.x, y=pos.y+yp, z=pos.z}
|
||||
local n = minetest.get_node(p)
|
||||
if (n.name=="mcl_core:water_flowing") then
|
||||
local d = minetest.registered_nodes[n.name]
|
||||
if (d.groups.water and d.liquidtype == "flowing") then
|
||||
drop_attached_node(pos)
|
||||
minetest.dig_node(pos)
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue