Files
Bubberstation/code/modules/unit_tests/plantgrowth_tests.dm
SkyratBot 78ebbb6f6e [MIRROR] (Hopefully) makes the plantgrowth_test not actually garbage [MDB IGNORE] (#18477)
* (Hopefully) makes the `plantgrowth_test` not actually garbage

* Update plantgrowth_tests.dm

Co-authored-by: Jolly <70232195+Jolly-66@users.noreply.github.com>
2023-01-03 17:31:04 +00:00

22 lines
934 B
Plaintext

// Checks plants for broken tray icons. Use Advanced Proc Call to activate.
// Maybe some day it would be used as unit test.
// -------- IT IS NOW!
/datum/unit_test/plantgrowth/Run()
var/list/paths = subtypesof(/obj/item/seeds) - /obj/item/seeds - typesof(/obj/item/seeds/sample) - /obj/item/seeds/lavaland
for(var/seedpath in paths)
var/obj/item/seeds/seed = new seedpath
for(var/i in 1 to seed.growthstages)
if(icon_exists(seed.growing_icon, "[seed.icon_grow][i]"))
continue
TEST_FAIL("[seed.name] ([seed.type]) lacks the [seed.icon_grow][i] icon!")
if(!(icon_exists(seed.growing_icon, seed.icon_dead)))
TEST_FAIL("[seed.name] ([seed.type]) lacks the [seed.icon_dead] icon!")
if(seed.icon_harvest) // mushrooms have no grown sprites, same for items with no product
if(!(icon_exists(seed.growing_icon, seed.icon_harvest)))
TEST_FAIL("[seed.name] ([seed.type]) lacks the [seed.icon_harvest] icon!")