mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-18 21:53:22 +00:00
* Fixes + unit tests botany plants mutating into themselves, and makes mutatelists proper lazylists * fixes merge issues Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
12 lines
531 B
Plaintext
12 lines
531 B
Plaintext
/// Unit test to ensure plants can't self-mutate into themselves.
|
|
/datum/unit_test/hydroponics_self_mutation
|
|
|
|
/datum/unit_test/hydroponics_self_mutation/Run()
|
|
var/list/all_seeds = subtypesof(/obj/item/seeds)
|
|
|
|
for(var/seed in all_seeds)
|
|
var/obj/item/seeds/instantiated_seed = new seed()
|
|
for(var/path in instantiated_seed.mutatelist)
|
|
TEST_ASSERT(!istype(instantiated_seed, path), "[instantiated_seed] - [instantiated_seed.type] is able to mutate into itself! Its mutatelist is not set correctly.")
|
|
qdel(instantiated_seed)
|