ctf_map/base.lua: Fix code-style
This commit is contained in:
parent
c4e3683071
commit
526031473b
1 changed files with 15 additions and 15 deletions
|
@ -1,9 +1,9 @@
|
||||||
function ctf_map.place_base(color, pos)
|
function ctf_map.place_base(color, pos)
|
||||||
-- Spawn ind base
|
-- Spawn base
|
||||||
for x = pos.x - 2, pos.x + 2 do
|
for x = pos.x - 2, pos.x + 2 do
|
||||||
for z = pos.z - 2, pos.z + 2 do
|
for z = pos.z - 2, pos.z + 2 do
|
||||||
minetest.set_node({ x = x, y = pos.y - 1, z = z },
|
minetest.set_node({ x = x, y = pos.y - 1, z = z },
|
||||||
{ name = ctf_map.map.base_node or "ctf_map:ind_cobble" })
|
{ name = ctf_map.map.base_node or "ctf_map:cobble" })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -11,20 +11,20 @@ function ctf_map.place_base(color, pos)
|
||||||
for y = pos.y, pos.y + 3 do
|
for y = pos.y, pos.y + 3 do
|
||||||
for x = pos.x - 3, pos.x + 3 do
|
for x = pos.x - 3, pos.x + 3 do
|
||||||
for z = pos.z - 3, pos.z + 3 do
|
for z = pos.z - 3, pos.z + 3 do
|
||||||
local pos2 = {x=x, y=y, z=z}
|
local pos2 = { x = x, y = y, z = z }
|
||||||
if minetest.get_node(pos2).name == "default:tree" then
|
if minetest.get_node(pos2).name == "default:tree" then
|
||||||
minetest.set_node(pos2, {name="air"})
|
minetest.set_node(pos2, { name = "air" })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Spawn chest
|
-- Spawn chest
|
||||||
local chest = {name = "ctf_map:chest_" .. color}
|
local chest = { name = "ctf_map:chest_" .. color }
|
||||||
local dz = 2
|
local dz = 2
|
||||||
if pos.z < 0 then
|
if pos.z < 0 then
|
||||||
dz = -2
|
dz = -2
|
||||||
chest.param2 = minetest.dir_to_facedir({x=0,y=0,z=-1})
|
chest.param2 = minetest.dir_to_facedir({ x = 0, y = 0, z = -1 })
|
||||||
end
|
end
|
||||||
local pos3 = {
|
local pos3 = {
|
||||||
x = pos.x,
|
x = pos.x,
|
||||||
|
|
Loading…
Reference in a new issue