Opened 8 years ago
Closed 7 years ago
#4166 closed enhancement (fixed)
Delete unused sprites and styles
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | If Time Permits | Milestone: | Alpha 21 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
Description
There are many sprites which have been used in some ancient version, but became unused and orphaned.
Every <sprite name="foo">
entry with no sprite="foo"
occurance in the XML files should be removed.
To ensure the removal was valid, one should also check that all.sprite =
occurances in JS also don't set the removed sprites.
There could be a tool for sources/tools/
that finds unused sprites, styles, potentially more (that does similar cleanup like the templatessorter, refs #4160).
Furthermore the indentation of many GUI XML files is broken.
Change History (2)
comment:1 by , 8 years ago
comment:2 by , 7 years ago
Keywords: | simple removed |
---|---|
Milestone: | Backlog → Alpha 21 |
Resolution: | → fixed |
Status: | new → closed |
Fixed by r18627, r18630, r18631, r18633, r18634, r18635, r18636, r18637, r18638.
Not convinced about adding the unused sprite tool, since keeping some unused themes makes sense, as we want to provide an interface that can be used by modders or future developers. Furthermore we would only be able to avoid false positives as we can't check the JS code logic with a tool.
Many orphaned sprites and styles were removed between r18627 and r18636, but there are likely many more and a script finding those would be nice too. (A sprite is used if there is some XML file in gui/ with sprite="name").