1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-18 08:10:38 +01:00

[sponge] Fix positions

This commit is contained in:
LeMagnesium 2015-09-20 13:36:43 +02:00
parent ace7a37889
commit 1e367dcbb7

View File

@ -19,7 +19,6 @@ minetest.register_node("sponge:sponge", {
end end
local change = false local change = false
local on_water = false local on_water = false
local pos = pointed_thing.above
-- verifier si il est dans l'eau ou a cotée -- verifier si il est dans l'eau ou a cotée
if string.find(minetest.get_node(pointed_thing.above).name, "water_source") if string.find(minetest.get_node(pointed_thing.above).name, "water_source")
or string.find(minetest.get_node(pointed_thing.above).name, "water_flowing") then or string.find(minetest.get_node(pointed_thing.above).name, "water_flowing") then
@ -66,10 +65,8 @@ minetest.register_node("sponge:sponge", {
end end
end end
if change then if change then
minetest.add_node(pointed_thing.above, {name = "sponge:sponge_wet"}) minetest.add_node(pos, {name = "sponge:sponge_wet"})
end end
p = {x=pos.x, y=pos.y, z=pos.z}
n = minetest.get_node(p)
end end
}) })