From a2e41623e68f6efcc9b05828cc39329e01dd969e Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 27 Dec 2014 16:09:03 +0000 Subject: [PATCH] Move stuff around --- mods/capturetheflag/{ => ctf}/area.lua | 4 ++-- mods/capturetheflag/{ => ctf}/cli.lua | 0 mods/capturetheflag/{ => ctf}/depends.txt | 0 mods/capturetheflag/{ => ctf}/flag.lua | 14 +++++++------- mods/capturetheflag/{ => ctf}/gui.lua | 0 mods/capturetheflag/{ => ctf}/init.lua | 8 ++++---- .../{ => ctf}/textures/diplo_alliance.png | Bin .../{ => ctf}/textures/diplo_peace.png | Bin .../{ => ctf}/textures/diplo_war.png | Bin .../{ => ctf}/textures/flag_blue.png | Bin .../{ => ctf}/textures/flag_blue2.png | Bin .../{ => ctf}/textures/flag_green.png | Bin .../{ => ctf}/textures/flag_green2.png | Bin .../{ => ctf}/textures/flag_red.png | Bin .../{ => ctf}/textures/flag_red2.png | Bin mods/capturetheflag/ctf_protect/depends.txt | 1 + .../ctf_protect}/init.lua | 0 mods/capturetheflag/modpack.txt | 0 mods/protecting/depends.txt | 1 - 19 files changed, 14 insertions(+), 14 deletions(-) rename mods/capturetheflag/{ => ctf}/area.lua (96%) rename mods/capturetheflag/{ => ctf}/cli.lua (100%) rename mods/capturetheflag/{ => ctf}/depends.txt (100%) rename mods/capturetheflag/{ => ctf}/flag.lua (96%) rename mods/capturetheflag/{ => ctf}/gui.lua (100%) rename mods/capturetheflag/{ => ctf}/init.lua (96%) rename mods/capturetheflag/{ => ctf}/textures/diplo_alliance.png (100%) rename mods/capturetheflag/{ => ctf}/textures/diplo_peace.png (100%) rename mods/capturetheflag/{ => ctf}/textures/diplo_war.png (100%) rename mods/capturetheflag/{ => ctf}/textures/flag_blue.png (100%) rename mods/capturetheflag/{ => ctf}/textures/flag_blue2.png (100%) rename mods/capturetheflag/{ => ctf}/textures/flag_green.png (100%) rename mods/capturetheflag/{ => ctf}/textures/flag_green2.png (100%) rename mods/capturetheflag/{ => ctf}/textures/flag_red.png (100%) rename mods/capturetheflag/{ => ctf}/textures/flag_red2.png (100%) create mode 100644 mods/capturetheflag/ctf_protect/depends.txt rename mods/{protecting => capturetheflag/ctf_protect}/init.lua (100%) create mode 100644 mods/capturetheflag/modpack.txt delete mode 100644 mods/protecting/depends.txt diff --git a/mods/capturetheflag/area.lua b/mods/capturetheflag/ctf/area.lua similarity index 96% rename from mods/capturetheflag/area.lua rename to mods/capturetheflag/ctf/area.lua index 19319eb..dc5276c 100644 --- a/mods/capturetheflag/area.lua +++ b/mods/capturetheflag/ctf/area.lua @@ -117,7 +117,7 @@ function cf.area.get_spawn(team) cf.area.asset_flags(team) 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) if not flag then @@ -151,7 +151,7 @@ function cf.area.asset_flags(team) local tmp = cf.team(team).flags 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...") end end diff --git a/mods/capturetheflag/cli.lua b/mods/capturetheflag/ctf/cli.lua similarity index 100% rename from mods/capturetheflag/cli.lua rename to mods/capturetheflag/ctf/cli.lua diff --git a/mods/capturetheflag/depends.txt b/mods/capturetheflag/ctf/depends.txt similarity index 100% rename from mods/capturetheflag/depends.txt rename to mods/capturetheflag/ctf/depends.txt diff --git a/mods/capturetheflag/flag.lua b/mods/capturetheflag/ctf/flag.lua similarity index 96% rename from mods/capturetheflag/flag.lua rename to mods/capturetheflag/ctf/flag.lua index ccdaf0f..3b2fc11 100644 --- a/mods/capturetheflag/flag.lua +++ b/mods/capturetheflag/ctf/flag.lua @@ -185,7 +185,7 @@ cf.flag_func = { -- add flag 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 -- send message minetest.chat_send_all(team.."'s flag has been moved") @@ -214,7 +214,7 @@ cf.flag_func = { cf.save() 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) @@ -227,7 +227,7 @@ cf.flag_func = { } -- The flag -minetest.register_node("capturetheflag:flag",{ +minetest.register_node("ctf:flag",{ description = "Flag", drawtype="nodebox", paramtype = "light", @@ -256,7 +256,7 @@ local colors = {"red","green","blue"} for i=1,#colors do 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", drawtype="nodebox", paramtype = "light", @@ -282,7 +282,7 @@ for i=1,#colors do }) 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", drawtype="nodebox", paramtype = "light", @@ -353,9 +353,9 @@ minetest.register_abm({ end 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 - 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 topmeta = minetest.env:get_meta(top) diff --git a/mods/capturetheflag/gui.lua b/mods/capturetheflag/ctf/gui.lua similarity index 100% rename from mods/capturetheflag/gui.lua rename to mods/capturetheflag/ctf/gui.lua diff --git a/mods/capturetheflag/init.lua b/mods/capturetheflag/ctf/init.lua similarity index 96% rename from mods/capturetheflag/init.lua rename to mods/capturetheflag/ctf/init.lua index 049882b..1516bc7 100644 --- a/mods/capturetheflag/init.lua +++ b/mods/capturetheflag/ctf/init.lua @@ -324,10 +324,10 @@ cf.init() cf.clean_player_lists() -- Load Modules -dofile(minetest.get_modpath("capturetheflag").."/area.lua") -dofile(minetest.get_modpath("capturetheflag").."/gui.lua") -dofile(minetest.get_modpath("capturetheflag").."/cli.lua") -dofile(minetest.get_modpath("capturetheflag").."/flag.lua") +dofile(minetest.get_modpath("ctf").."/area.lua") +dofile(minetest.get_modpath("ctf").."/gui.lua") +dofile(minetest.get_modpath("ctf").."/cli.lua") +dofile(minetest.get_modpath("ctf").."/flag.lua") -- Load other cf.collect_claimed() diff --git a/mods/capturetheflag/textures/diplo_alliance.png b/mods/capturetheflag/ctf/textures/diplo_alliance.png similarity index 100% rename from mods/capturetheflag/textures/diplo_alliance.png rename to mods/capturetheflag/ctf/textures/diplo_alliance.png diff --git a/mods/capturetheflag/textures/diplo_peace.png b/mods/capturetheflag/ctf/textures/diplo_peace.png similarity index 100% rename from mods/capturetheflag/textures/diplo_peace.png rename to mods/capturetheflag/ctf/textures/diplo_peace.png diff --git a/mods/capturetheflag/textures/diplo_war.png b/mods/capturetheflag/ctf/textures/diplo_war.png similarity index 100% rename from mods/capturetheflag/textures/diplo_war.png rename to mods/capturetheflag/ctf/textures/diplo_war.png diff --git a/mods/capturetheflag/textures/flag_blue.png b/mods/capturetheflag/ctf/textures/flag_blue.png similarity index 100% rename from mods/capturetheflag/textures/flag_blue.png rename to mods/capturetheflag/ctf/textures/flag_blue.png diff --git a/mods/capturetheflag/textures/flag_blue2.png b/mods/capturetheflag/ctf/textures/flag_blue2.png similarity index 100% rename from mods/capturetheflag/textures/flag_blue2.png rename to mods/capturetheflag/ctf/textures/flag_blue2.png diff --git a/mods/capturetheflag/textures/flag_green.png b/mods/capturetheflag/ctf/textures/flag_green.png similarity index 100% rename from mods/capturetheflag/textures/flag_green.png rename to mods/capturetheflag/ctf/textures/flag_green.png diff --git a/mods/capturetheflag/textures/flag_green2.png b/mods/capturetheflag/ctf/textures/flag_green2.png similarity index 100% rename from mods/capturetheflag/textures/flag_green2.png rename to mods/capturetheflag/ctf/textures/flag_green2.png diff --git a/mods/capturetheflag/textures/flag_red.png b/mods/capturetheflag/ctf/textures/flag_red.png similarity index 100% rename from mods/capturetheflag/textures/flag_red.png rename to mods/capturetheflag/ctf/textures/flag_red.png diff --git a/mods/capturetheflag/textures/flag_red2.png b/mods/capturetheflag/ctf/textures/flag_red2.png similarity index 100% rename from mods/capturetheflag/textures/flag_red2.png rename to mods/capturetheflag/ctf/textures/flag_red2.png diff --git a/mods/capturetheflag/ctf_protect/depends.txt b/mods/capturetheflag/ctf_protect/depends.txt new file mode 100644 index 0000000..a7176f2 --- /dev/null +++ b/mods/capturetheflag/ctf_protect/depends.txt @@ -0,0 +1 @@ +ctf \ No newline at end of file diff --git a/mods/protecting/init.lua b/mods/capturetheflag/ctf_protect/init.lua similarity index 100% rename from mods/protecting/init.lua rename to mods/capturetheflag/ctf_protect/init.lua diff --git a/mods/capturetheflag/modpack.txt b/mods/capturetheflag/modpack.txt new file mode 100644 index 0000000..e69de29 diff --git a/mods/protecting/depends.txt b/mods/protecting/depends.txt deleted file mode 100644 index ba9bf17..0000000 --- a/mods/protecting/depends.txt +++ /dev/null @@ -1 +0,0 @@ -capturetheflag \ No newline at end of file