Improve directory structure of maps

- Each map will have its own sub-dir, containing
  - `map.conf` (used to be `<map_name>.conf`)
  - `map.mts` (used to be `<map_name>.mts`)
  - `screenshot.png` (used to be `<map_name>.png`)
  - `skybox_<n>.png` (used to be `<map_name>_skybox_<n>.png`)
- The `ctf_map` post-processing actions for maps has been moved into a dedicated shell script `setup_maps.sh`. This script appropriately renames all the textures to while copying them over to the mod's textures/ sub-dir. e.g.
  - `cool_map/screenshot.png` ---> `cool_map.png`
  - `awesome_map/skybox_2.png` ---> `awesome_map_skybox_2.png`
This commit is contained in:
ANAND 2019-07-07 13:54:50 +05:30
parent 739eac1d10
commit cbee83a2ac
5 changed files with 73 additions and 79 deletions

View file

@ -12,20 +12,20 @@ function ctf_map.update_time()
minetest.settings:set("time_speed", BASE_TIME_SPEED * mult)
end
function ctf_map.skybox_exists(subdir, filename)
function ctf_map.skybox_exists(subdir)
return ctf_map.file_exists(subdir, {
filename .. "_skybox_1.png",
filename .. "_skybox_2.png",
filename .. "_skybox_3.png",
filename .. "_skybox_4.png",
filename .. "_skybox_5.png",
filename .. "_skybox_6.png"
"skybox_1.png",
"skybox_2.png",
"skybox_3.png",
"skybox_4.png",
"skybox_5.png",
"skybox_6.png"
})
end
function ctf_map.set_skybox(player)
if ctf_map.map.skybox then
local prefix = ctf_map.map.filename .. "_skybox_"
local prefix = ctf_map.map.dirname .. "_skybox_"
local skybox_textures = {
prefix .. "1.png", -- up
prefix .. "2.png", -- down