Track LineTexture from Selectable/Overlay/Outline

The entity parser handled LineTexture/LineTextureMask under
Heal/RangeOverlay and MainTexture/MainTextureMask under
Selectable/Overlay/Texture, but had no handling for the
Selectable/Overlay/Outline/{LineTexture,LineTextureMask} path
used by the outline selection ring renderer.

These textures are referenced in e.g. mixins/trading_post.xml and
any other template that sets a custom outline selection style.

Fixes 2 false-positive unused-file warnings:
  art/textures/selection/outline_border_02.png
  art/textures/selection/outline_border_02_mask.png
This commit is contained in:
Stanislas Daniel Claude Dolcini
2026-03-31 00:05:20 +01:00
committed by Stan
parent e5c1b68481
commit d65e51c38b
+10
View File
@@ -424,6 +424,16 @@ class CheckRefs:
elem = texture.find(tag)
if elem is not None and elem.text:
self.deps.append((fp, Path(f"art/textures/selection/{elem.text}")))
if (
entity.find("Selectable") is not None
and entity.find("Selectable").find("Overlay") is not None
and entity.find("Selectable").find("Overlay").find("Outline") is not None
):
outline = entity.find("Selectable").find("Overlay").find("Outline")
for tag in ("LineTexture", "LineTextureMask"):
elem = outline.find(tag)
if elem is not None and elem.text:
self.deps.append((fp, Path(f"art/textures/selection/{elem.text}")))
if entity.find("Formation") is not None:
icon = entity.find("Formation").find("Icon")
if icon is not None and icon.text: