mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 06:58:07 +00:00
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:
committed by
Stan
parent
e5c1b68481
commit
d65e51c38b
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user