Add indestructible floor to ctf_team_base
|
@ -13,6 +13,13 @@ minetest.register_node("ctf_barrier:ind_glass", {
|
|||
sounds = default.node_sound_glass_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node("ctf_barrier:ind_stone", {
|
||||
description = "Cheater!",
|
||||
groups = {immortal = 1},
|
||||
tiles = {"default_stone.png"},
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
minetest.register_node("ctf_barrier:ind_glass_red", {
|
||||
description = "You cheater you!",
|
||||
drawtype = "glasslike",
|
||||
|
@ -30,12 +37,11 @@ minetest.register_node("ctf_barrier:ind_glass_red", {
|
|||
sounds = default.node_sound_glass_defaults()
|
||||
})
|
||||
|
||||
local lim = ctf.setting("match.map_reset_limit")
|
||||
local c_stone = minetest.get_content_id("ctf_barrier:ind_stone")
|
||||
local c_glass = minetest.get_content_id("ctf_barrier:ind_glass")
|
||||
local c_glass_red = minetest.get_content_id("ctf_barrier:ind_glass_red")
|
||||
local c_water = minetest.get_content_id("default:water_source")
|
||||
local c_water_f = minetest.get_content_id("default:water_flowing")
|
||||
local c_stone = minetest.get_content_id("ctf_flag:ind_base")
|
||||
local c_air = minetest.get_content_id("air")
|
||||
local r = tonumber(minetest.setting_get("barrier"))
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9804ec7518a5c94108fc19f59e67e7a84fc698a3
|
||||
Subproject commit 622dcb8468df885e7111c8b7e1a52999df4058a4
|
|
@ -1,3 +1,4 @@
|
|||
ctf
|
||||
ctf_flag
|
||||
ctf_match
|
||||
ctf_barrier
|
|
@ -12,7 +12,7 @@ local chest_formspec =
|
|||
|
||||
local colors = {"red", "blue"}
|
||||
for _, color in pairs(colors) do
|
||||
minetest.register_node("ctf_team_chest:chest_" .. color, {
|
||||
minetest.register_node("ctf_team_base:chest_" .. color, {
|
||||
description = "Chest",
|
||||
tiles = {
|
||||
"default_chest_top_" .. color .. ".png",
|
||||
|
@ -58,8 +58,28 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
if minp.x <= flag.x and maxp.x >= flag.x and
|
||||
minp.y <= flag.y and maxp.y >= flag.y and
|
||||
minp.z <= flag.z and maxp.z >= flag.z then
|
||||
-- Spawn ind base
|
||||
for x = flag.x - 2, flag.x + 2 do
|
||||
for z = flag.z - 2, flag.z + 2 do
|
||||
minetest.set_node({ x = x, y = flag.y - 1, z = z},
|
||||
{name = "ctf_barrier:ind_stone"})
|
||||
end
|
||||
end
|
||||
|
||||
local chest = {name = "ctf_team_chest:chest_" .. team.data.color}
|
||||
-- Check for trees
|
||||
for y = flag.y, flag.y + 2 do
|
||||
for x = flag.x - 3, flag.x + 3 do
|
||||
for z = flag.z - 3, flag.z + 3 do
|
||||
local pos = {x=x, y=y, z=z}
|
||||
if minetest.get_node(pos).name == "default:tree" then
|
||||
minetest.set_node(pos, {name="air"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Spawn chest
|
||||
local chest = {name = "ctf_team_base:chest_" .. team.data.color}
|
||||
local dz = 2
|
||||
if flag.z < 0 then
|
||||
dz = -2
|
||||
|
@ -70,10 +90,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
y = flag.y,
|
||||
z = flag.z + dz
|
||||
}
|
||||
|
||||
minetest.set_node(pos, chest)
|
||||
print("Flag " .. dump(flag))
|
||||
|
||||
local inv = minetest.get_inventory({type = "node", pos=pos})
|
||||
inv:add_item("main", ItemStack("default:stone 99"))
|
||||
inv:add_item("main", ItemStack("default:stone 99"))
|
Before Width: | Height: | Size: 625 B After Width: | Height: | Size: 625 B |
Before Width: | Height: | Size: 614 B After Width: | Height: | Size: 614 B |
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 587 B |