File tree 2 files changed +22
-16
lines changed
2 files changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -183,9 +183,31 @@ function ctf_map.load_map_meta(idx, dirname)
183
183
184
184
map .flag_center = calc_flag_center (map )
185
185
186
+ for _ , e in pairs (minetest .get_dir_list (ctf_map .map_path [dirname ], false )) do
187
+ if e :match (" %.png" ) then
188
+ if core .features .dynamic_add_media_startup then
189
+ minetest .dynamic_add_media ({
190
+ filename = dirname .. " _" .. e ,
191
+ filepath = ctf_map .map_path [dirname ] .. " /" .. e }
192
+ )
193
+ end
194
+ end
195
+ end
196
+
186
197
if ctf_map .skybox_exists (ctf_map .map_path [dirname ]) then
187
198
skybox .add ({dirname , " #ffffff" , [5 ] = " png" })
188
199
200
+ for _ , e in pairs (minetest .get_dir_list (ctf_map .map_path [dirname ] .. " /skybox/" , false )) do
201
+ if e :match (" %.png" ) then
202
+ if core .features .dynamic_add_media_startup then
203
+ minetest .dynamic_add_media ({
204
+ filename = dirname .. e ,
205
+ filepath = ctf_map .map_path [dirname ] .. " /skybox/" .. e }
206
+ )
207
+ end
208
+ end
209
+ end
210
+
189
211
map .skybox = dirname
190
212
map .skybox_forced = true
191
213
end
Original file line number Diff line number Diff line change 8
8
9
9
cd mods/ctf/ctf_map/maps/
10
10
11
- # Copy textures from map sub-dirs to ctf_map_core/textures
12
11
for f in * ; do
13
12
if [ -d ${f} ]; then
14
- # Copy map screenshot to textures dir
15
- if [ -f ${f} /screenshot.png ]; then
16
- cp ${f} /screenshot.png ../textures/${f} _screenshot.png
17
- fi
18
-
19
13
# Move skybox textures into map skybox folder if they aren't already there
20
14
if [ -f ${f} /skybox_1.png ]; then
21
15
if ! [ -d ${f} /skybox/ ]; then
@@ -30,15 +24,5 @@ for f in *; do
30
24
cp ${f} /skybox_6.png ${f} /skybox/Right.png
31
25
rm ${f} /skybox_* .png
32
26
fi
33
-
34
- # Move skybox textures to textures dir where Minetest can find them
35
- if [ -d ${f} /skybox/ ]; then
36
- cp ${f} /skybox/Up.png ../textures/${f} Up.png
37
- cp ${f} /skybox/Down.png ../textures/${f} Down.png
38
- cp ${f} /skybox/Front.png ../textures/${f} Front.png
39
- cp ${f} /skybox/Back.png ../textures/${f} Back.png
40
- cp ${f} /skybox/Left.png ../textures/${f} Left.png
41
- cp ${f} /skybox/Right.png ../textures/${f} Right.png
42
- fi
43
27
fi
44
28
done
You can’t perform that action at this time.
0 commit comments