Move stuff around
@ -117,7 +117,7 @@ function cf.area.get_spawn(team)
|
|||||||
cf.area.asset_flags(team)
|
cf.area.asset_flags(team)
|
||||||
|
|
||||||
if team and cf.teams and cf.team(team) then
|
if team and cf.teams and cf.team(team) then
|
||||||
if cf.team(team).spawn and minetest.env:get_node(cf.team(team).spawn).name == "capturetheflag:flag" then
|
if cf.team(team).spawn and minetest.env:get_node(cf.team(team).spawn).name == "ctf:flag" then
|
||||||
local flag = cf.area.get_flag(cf.team(team).spawn)
|
local flag = cf.area.get_flag(cf.team(team).spawn)
|
||||||
|
|
||||||
if not flag then
|
if not flag then
|
||||||
@ -151,7 +151,7 @@ function cf.area.asset_flags(team)
|
|||||||
local tmp = cf.team(team).flags
|
local tmp = cf.team(team).flags
|
||||||
|
|
||||||
for i=1,#tmp do
|
for i=1,#tmp do
|
||||||
if tmp[i] and (not minetest.env:get_node(tmp[i]) or not minetest.env:get_node(tmp[i]).name == "capturetheflag:flag") then
|
if tmp[i] and (not minetest.env:get_node(tmp[i]) or not minetest.env:get_node(tmp[i]).name == "ctf:flag") then
|
||||||
print("Replacing flag...")
|
print("Replacing flag...")
|
||||||
end
|
end
|
||||||
end
|
end
|
@ -185,7 +185,7 @@ cf.flag_func = {
|
|||||||
-- add flag
|
-- add flag
|
||||||
cf.area.add_flag(team,pos)
|
cf.area.add_flag(team,pos)
|
||||||
|
|
||||||
if cf.teams[team].spawn and minetest.env:get_node(cf.teams[team].spawn).name == "capturetheflag:flag" then
|
if cf.teams[team].spawn and minetest.env:get_node(cf.teams[team].spawn).name == "ctf:flag" then
|
||||||
if not cf.setting("multiple_flags") then
|
if not cf.setting("multiple_flags") then
|
||||||
-- send message
|
-- send message
|
||||||
minetest.chat_send_all(team.."'s flag has been moved")
|
minetest.chat_send_all(team.."'s flag has been moved")
|
||||||
@ -214,7 +214,7 @@ cf.flag_func = {
|
|||||||
cf.save()
|
cf.save()
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.env:set_node(pos2,{name="capturetheflag:flag_top_"..cf.team(team).data.color})
|
minetest.env:set_node(pos2,{name="ctf:flag_top_"..cf.team(team).data.color})
|
||||||
|
|
||||||
local meta2 = minetest.env:get_meta(pos2)
|
local meta2 = minetest.env:get_meta(pos2)
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ cf.flag_func = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- The flag
|
-- The flag
|
||||||
minetest.register_node("capturetheflag:flag",{
|
minetest.register_node("ctf:flag",{
|
||||||
description = "Flag",
|
description = "Flag",
|
||||||
drawtype="nodebox",
|
drawtype="nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -256,7 +256,7 @@ local colors = {"red","green","blue"}
|
|||||||
|
|
||||||
for i=1,#colors do
|
for i=1,#colors do
|
||||||
local color = colors[i]
|
local color = colors[i]
|
||||||
minetest.register_node("capturetheflag:flag_top_"..color,{
|
minetest.register_node("ctf:flag_top_"..color,{
|
||||||
description = "You are not meant to have this! - flag top",
|
description = "You are not meant to have this! - flag top",
|
||||||
drawtype="nodebox",
|
drawtype="nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -282,7 +282,7 @@ for i=1,#colors do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("capturetheflag:flag_captured_top",{
|
minetest.register_node("ctf:flag_captured_top",{
|
||||||
description = "You are not meant to have this! - flag captured",
|
description = "You are not meant to have this! - flag captured",
|
||||||
drawtype="nodebox",
|
drawtype="nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -353,9 +353,9 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
|
|
||||||
if flag_team_data.claimed then
|
if flag_team_data.claimed then
|
||||||
minetest.env:set_node(top,{name="capturetheflag:flag_captured_top"})
|
minetest.env:set_node(top,{name="ctf:flag_captured_top"})
|
||||||
else
|
else
|
||||||
minetest.env:set_node(top,{name="capturetheflag:flag_top_"..cf.team(flag_team_data.team).data.color})
|
minetest.env:set_node(top,{name="ctf:flag_top_"..cf.team(flag_team_data.team).data.color})
|
||||||
end
|
end
|
||||||
|
|
||||||
topmeta = minetest.env:get_meta(top)
|
topmeta = minetest.env:get_meta(top)
|
@ -324,10 +324,10 @@ cf.init()
|
|||||||
cf.clean_player_lists()
|
cf.clean_player_lists()
|
||||||
|
|
||||||
-- Load Modules
|
-- Load Modules
|
||||||
dofile(minetest.get_modpath("capturetheflag").."/area.lua")
|
dofile(minetest.get_modpath("ctf").."/area.lua")
|
||||||
dofile(minetest.get_modpath("capturetheflag").."/gui.lua")
|
dofile(minetest.get_modpath("ctf").."/gui.lua")
|
||||||
dofile(minetest.get_modpath("capturetheflag").."/cli.lua")
|
dofile(minetest.get_modpath("ctf").."/cli.lua")
|
||||||
dofile(minetest.get_modpath("capturetheflag").."/flag.lua")
|
dofile(minetest.get_modpath("ctf").."/flag.lua")
|
||||||
|
|
||||||
-- Load other
|
-- Load other
|
||||||
cf.collect_claimed()
|
cf.collect_claimed()
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 776 B After Width: | Height: | Size: 776 B |
Before Width: | Height: | Size: 732 B After Width: | Height: | Size: 732 B |
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 826 B |
Before Width: | Height: | Size: 775 B After Width: | Height: | Size: 775 B |
Before Width: | Height: | Size: 812 B After Width: | Height: | Size: 812 B |
Before Width: | Height: | Size: 874 B After Width: | Height: | Size: 874 B |
1
mods/capturetheflag/ctf_protect/depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
ctf
|
0
mods/capturetheflag/modpack.txt
Normal file
@ -1 +0,0 @@
|
|||||||
capturetheflag
|
|