mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
* Adds unit test to check for spritesheet issues (#70351) * Adds a new spritesheet unit test to catch edge-cases that caused problems in the past. * Adds unit test to check for spritesheet issues Co-authored-by: AnturK <AnturK@users.noreply.github.com>
12 lines
455 B
Plaintext
12 lines
455 B
Plaintext
///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.")
|