forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds unit test to check for spritesheet issues (tgstation#70351)
* Adds a new spritesheet unit test to catch edge-cases that caused problems in the past.
- Loading branch information
Showing
4 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
///Checks if spritesheet assets contain icon states with invalid names | ||
/datum/unit_test/spritesheets | ||
|
||
/datum/unit_test/spritesheets/Run() | ||
for(var/datum/asset/spritesheet/sheet as anything in subtypesof(/datum/asset/spritesheet)) | ||
if(!initial(sheet.name)) //Ignore abstract types | ||
continue | ||
sheet = get_asset_datum(sheet) | ||
for(var/sprite_name in sheet.sprites) | ||
if(!sprite_name) | ||
TEST_FAIL("Spritesheet [sheet.type] has a nameless icon state.") |
Binary file not shown.