1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-25 02:00:37 +01:00

[sponge] Improve spong

- Make sponges able to suck river water
 - Fix #281
This commit is contained in:
LeMagnesium 2015-09-23 20:52:51 +02:00
parent 14d12abd37
commit 6a5e8d4d74

View File

@ -28,7 +28,8 @@ minetest.register_node("sponge:sponge", {
p = {x=pos.x+i, y=pos.y, z=pos.z}
n = minetest.get_node(p)
-- On verifie si il y a de l'eau
if (n.name=="default:water_flowing") or (n.name == "default:water_source") then
if (n.name=="default:water_flowing") or (n.name == "default:water_source")
or (n.name == "default:river_water_flowing") or (n.name == "default:river_water_source") then
on_water = true
end
end
@ -36,7 +37,8 @@ minetest.register_node("sponge:sponge", {
p = {x=pos.x, y=pos.y+i, z=pos.z}
n = minetest.get_node(p)
-- On verifie si il y a de l'eau
if (n.name=="default:water_flowing") or (n.name == "default:water_source") then
if (n.name=="default:water_flowing") or (n.name == "default:water_source")
or (n.name == "default:river_water_flowing") or (n.name == "default:river_water_source") then
on_water = true
end
end
@ -44,7 +46,8 @@ minetest.register_node("sponge:sponge", {
p = {x=pos.x, y=pos.y, z=pos.z+i}
n = minetest.get_node(p)
-- On verifie si il y a de l'eau
if (n.name=="default:water_flowing") or (n.name == "default:water_source") then
if (n.name=="default:water_flowing") or (n.name == "default:water_source")
or (n.name == "default:river_water_flowing") or (n.name == "default:river_water_source") then
on_water = true
end
end
@ -56,7 +59,8 @@ minetest.register_node("sponge:sponge", {
p = {x=pos.x+i, y=pos.y+j, z=pos.z+k}
n = minetest.get_node(p)
-- On Supprime l'eau
if (n.name=="default:water_flowing") or (n.name == "default:water_source")then
if (n.name=="default:water_flowing") or (n.name == "default:water_source")
or (n.name == "default:river_water_flowing") or (n.name == "default:river_water_source") then
minetest.add_node(p, {name="air"})
change = true
end