2017-12-23 16:33:05 +00:00
|
|
|
ctf_map = {}
|
|
|
|
|
2019-03-17 03:32:15 +00:00
|
|
|
function ctf_map.get_team_relative_z(player)
|
|
|
|
local name = player:get_player_name()
|
|
|
|
local tname = ctf.player(name).team
|
|
|
|
return (tname == "red" and 1 or -1) * player:get_pos().z
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Overridden by server mods
|
|
|
|
function ctf_map.can_cross(player)
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
2019-05-12 13:23:31 +00:00
|
|
|
local modpath = minetest.get_modpath("ctf_map")
|
|
|
|
dofile(modpath .. "/nodes.lua")
|
|
|
|
dofile(modpath .. "/emerge.lua")
|
|
|
|
dofile(modpath .. "/barrier.lua")
|
|
|
|
dofile(modpath .. "/base.lua")
|
2017-12-23 16:33:05 +00:00
|
|
|
|
|
|
|
if minetest.get_modpath("ctf") then
|
2019-05-12 13:23:31 +00:00
|
|
|
dofile(modpath .. "/chest.lua")
|
|
|
|
dofile(modpath .. "/give_initial_stuff.lua")
|
|
|
|
dofile(modpath .. "/schem_map.lua")
|
|
|
|
dofile(modpath .. "/maps_catalog.lua")
|
2017-12-23 16:33:05 +00:00
|
|
|
|
|
|
|
ctf_match.register_on_build_time_end(ctf_map.remove_middle_barrier)
|
|
|
|
else
|
2019-05-12 13:23:31 +00:00
|
|
|
dofile(modpath .. "/map_maker.lua")
|
2017-12-23 16:33:05 +00:00
|
|
|
end
|