Files
Bubberstation/code/modules/unit_tests/egg_glands.dm
Mothblocks 70957c1623 Fix invisible powder breaking color blending (#59188)
Fixes a bug where egg glands (eggs with a random reagent) would runtime if they combined with invisible powder.

Invisible powder was setting their color to null, which broke everything. This doesn't change any behavior as invisible powder hardly works anyway.
2021-05-20 22:45:08 +12:00

15 lines
512 B
Plaintext

/// Verifies that all glands for an egg are valid
/datum/unit_test/egg_glands
/datum/unit_test/egg_glands/Run()
var/obj/item/food/egg/egg = allocate(/obj/item/food/egg)
for (var/datum/reagent/reagent_type as anything in subtypesof(/datum/reagent))
if (!(initial(reagent_type.chemical_flags) & REAGENT_CAN_BE_SYNTHESIZED))
continue
try
mix_color_from_reagents(egg.reagents.reagent_list + list(new reagent_type))
catch (var/exception/exception)
Fail("[reagent_type] fails mixing\n[exception]")