]> de.git.xonotic.org Git - xonotic/xonotic-maps.pk3dir.git/blobdiff - scripts/shader-audit.sh
new skyboxes by cuinnton
[xonotic/xonotic-maps.pk3dir.git] / scripts / shader-audit.sh
index 8076dea9eeee87014ab2e605d9530944bfb019e1..0d19a20229c26cfcd87a4115fa7772d13cd64082 100644 (file)
@@ -55,6 +55,17 @@ use_texture()
                                        ;;
                        esac
                        ;;
+               textures/map_*/*)
+                       pre=${1%%/map_*}
+                       suf=${1#*/map_}
+                       case "$2" in
+                               "$pre"/map_*)
+                                       ;;
+                               *)
+                                       echo "(EE) texture $2 of shader $1 is out of place, recommended file name is $pre/map_$suf"
+                                       ;;
+                       esac
+                       ;;
                textures/common/*)
                        case "$2" in
                                "$1")
@@ -165,5 +176,13 @@ textures_avail=`( cd ..; find textures/ -type f -not -name '*_norm.*' -not -name
 textures_used=`echo "${textures_used#$LF}" | sort -u`
 
 echo "$textures_used$LF$textures_used$LF$textures_avail" | sort | uniq -u | while IFS= read -r L; do
-       echo "(EE) texture $L is not referenced by any shader"
+       case "$L" in
+               textures/radiant/*)
+                       ;;
+               textures/map_*/*)
+                       ;;
+               *)
+                       echo "(EE) texture $L is not referenced by any shader"
+                       ;;
+       esac
 done