Clean up trailing whitespace.

Done using `cleanfile`.
This commit is contained in:
Auke Kok 2016-05-25 22:29:25 -07:00
parent 20c0275ddd
commit c35f6a2d03

View File

@ -85,14 +85,14 @@ local function check_portal(p1, p2)
else else
return false return false
end end
if not move_check(p1, p2.y, "y") then if not move_check(p1, p2.y, "y") then
return false return false
end end
if not move_check(p2, p1.y, "y") then if not move_check(p2, p1.y, "y") then
return false return false
end end
return true return true
end end
@ -117,7 +117,7 @@ local function make_portal(pos)
if not p1 or not p2 then if not p1 or not p2 then
return false return false
end end
for d = 1, 2 do for d = 1, 2 do
for y = p1.y + 1, p2.y - 1 do for y = p1.y + 1, p2.y - 1 do
local p local p
@ -131,14 +131,14 @@ local function make_portal(pos)
end end
end end
end end
local param2 local param2
if p1.z == p2.z then if p1.z == p2.z then
param2 = 0 param2 = 0
else else
param2 = 1 param2 = 1
end end
local target = {x = p1.x, y = p1.y, z = p1.z} local target = {x = p1.x, y = p1.y, z = p1.z}
target.x = target.x + 1 target.x = target.x + 1
if target.y < NETHER_DEPTH then if target.y < NETHER_DEPTH then
@ -146,7 +146,7 @@ local function make_portal(pos)
else else
target.y = NETHER_DEPTH - math.random(500, 1500) target.y = NETHER_DEPTH - math.random(500, 1500)
end end
for d = 0, 3 do for d = 0, 3 do
for y = p1.y, p2.y do for y = p1.y, p2.y do
local p = {} local p = {}
@ -210,9 +210,9 @@ minetest.register_abm({
if minetest.get_node(objpos).name ~= "nether:portal" then if minetest.get_node(objpos).name ~= "nether:portal" then
return return
end end
obj:setpos(target) obj:setpos(target)
local function check_and_build_portal(pos, target) local function check_and_build_portal(pos, target)
local n = minetest.get_node_or_nil(target) local n = minetest.get_node_or_nil(target)
if n and n.name ~= "nether:portal" then if n and n.name ~= "nether:portal" then
@ -223,9 +223,9 @@ minetest.register_abm({
minetest.after(1, check_and_build_portal, pos, target) minetest.after(1, check_and_build_portal, pos, target)
end end
end end
minetest.after(1, check_and_build_portal, pos, target) minetest.after(1, check_and_build_portal, pos, target)
end, obj, pos, target) end, obj, pos, target)
end end
end end
@ -290,7 +290,7 @@ minetest.register_node(":default:obsidian", {
is_ground_content = true, is_ground_content = true,
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
groups = {cracky = 1, level = 2}, groups = {cracky = 1, level = 2},
on_destruct = function(pos) on_destruct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local p1 = minetest.string_to_pos(meta:get_string("p1")) local p1 = minetest.string_to_pos(meta:get_string("p1"))