From e44848985356d3550053f16c3472c19d934b869d Mon Sep 17 00:00:00 2001 From: maj00r Date: Wed, 14 Oct 2026 22:39:06 +0200 Subject: [PATCH] fix(tools): a skin material without a suffix is reported as unused when its ,1 ,2 versions exist, since the game loads those instead, so the 64 missing textures of the ELF were never missing in the game; param_specular in a shader without a sun highlight changes nothing and is only reported as information --- tools/materials/README.md | 2 +- tools/materials/validate_materials.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/materials/README.md b/tools/materials/README.md index 2a6ce3b3..5cfb9d1b 100644 --- a/tools/materials/README.md +++ b/tools/materials/README.md @@ -80,7 +80,7 @@ python3 tools/materials/validate_materials.py ~/pctga dynamic --fallback PARAM_SPECULAR_MAX and shadername.lower().startswith('water'): add(INFO, 'param_specular %g w shaderze %s: odblask slonca na lustrze wody, poza norma' % (ps, shadername)) + elif ps is not None and ps > PARAM_SPECULAR_MAX and shader['spec'] == 'none': + add(INFO, 'param_specular %g w shaderze %s bez polysku slonca: nic nie zmienia (w starszych shaderach rozjasnia w reflektorach)' % (ps, shadername)) elif ps is not None and ps > PARAM_SPECULAR_MAX: add(ERROR if ps > 2 * PARAM_SPECULAR_MAX else WARN, 'param_specular %g mnozy polysk %gx (norma 1, sile niesie R; w starszych shaderach rozjasnia tez w reflektorach)' % (ps, ps)) @@ -387,6 +389,9 @@ def check_group(mats): images = WORKER['images'] for mat in mats: rel = os.path.relpath(mat, WORKER['gamedir']) + if ',' not in os.path.basename(mat) and os.path.isfile(mat[:-4] + ',1.mat'): + results.append((rel, '-', [(INFO, 'nieuzywany: skora %s ma wersje ,1 ,2..., ktore gra bierze zamiast niego' % os.path.basename(mat)[:-4])])) + continue try: values, nested = parse_mat(mat) shadername, findings = check(mat, values, nested, WORKER['shaders'], WORKER['resolver'], images, rel)