summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortenplus1 <kinsellaja@yahoo.com>2015-05-12 09:46:26 +0100
committertenplus1 <kinsellaja@yahoo.com>2015-05-12 09:46:26 +0100
commit2befb9a980f62da3a9c4de2b94a59e8a08afc56a (patch)
tree858015d5e0583f3c67ac5f9d1a610a97ba779e98
parent787a260220c968a50b55ef9e826c042750bcb79a (diff)
Code tweaks
-rw-r--r--water.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/water.lua b/water.lua
index 946c676..ae5b290 100644
--- a/water.lua
+++ b/water.lua
@@ -44,7 +44,7 @@ minetest.register_abm({
interval = 30,
chance = 10,
action = function(pos, node)
- minetest.add_node(pos, {name="default:mossycobble"})
+ minetest.add_node(pos, {name="default:mossycobble"})
end
})
@@ -55,9 +55,10 @@ minetest.register_abm({
interval = 15,
chance = 2,
action = function(pos, node)
- local pos0 = {x=pos.x-1,y=pos.y-1,z=pos.z-1}
- local pos1 = {x=pos.x+1,y=pos.y+1,z=pos.z+1}
- local water = minetest.find_nodes_in_area(pos0, pos1, "default:water_source")
+ local water = minetest.find_nodes_in_area(
+ {x=pos.x-1,y=pos.y-1,z=pos.z-1},
+ {x=pos.x+1,y=pos.y+1,z=pos.z+1},
+ "default:water_source")
if water then
minetest.set_node(water[1], {name="default:ice"})
end