Add indestructable base to flags

This commit is contained in:
rubenwardy 2015-11-22 19:32:55 +00:00
parent 4a713b4f70
commit 92ac749757
2 changed files with 20 additions and 4 deletions

View file

@ -94,9 +94,25 @@ ctf.register_on_new_game(function()
end
minetest.after(0, function()
for name, p in pairs(pos) do
safe_place(p, {name = "ctf_flag:flag"})
ctf_flag.update(p)
for name, flag in pairs(pos) do
safe_place(flag, {name = "ctf_flag:flag"})
ctf_flag.update(flag)
local function base_at(flag, dx, dz)
safe_place({
x = flag.x + dx,
y = flag.y - 1,
z = flag.z + dz,
}, { name = "ctf_flag:ind_base"})
end
base_at(flag, -1, -1)
base_at(flag, -1, 0)
base_at(flag, -1, 1)
base_at(flag, 0, -1)
base_at(flag, 0, 0)
base_at(flag, 0, 1)
base_at(flag, 1, -1)
base_at(flag, 1, 0)
base_at(flag, 1, 1)
end
end)

@ -1 +1 @@
Subproject commit f8d56da0f0c8a887de1c4bd584f360b2e6a8a3f0
Subproject commit 85d0eda86411e2ef2dba5b5155d2764389a83f7f