[NO GBP] Adds unit test checks for materials and processable comp & co. (#92194)

This commit is contained in:
Ghom
2025-07-30 13:17:12 +02:00
committed by GitHub
parent ce83354a3a
commit 4975174928
19 changed files with 176 additions and 111 deletions
+12
View File
@@ -29,6 +29,18 @@
if(positive_result)
ADD_TRAIT(parent, TRAIT_BAKEABLE, REF(src))
var/obj/item/item_target = parent
if(!PERFORM_ALL_TESTS(focus_only/check_materials_when_processed) || !positive_result || !item_target.custom_materials)
return
var/atom/result = new bake_result
if(!item_target.compare_materials(result))
var/warning = "custom_materials of [result.type] when baked compared to just spawned don't match"
var/what_it_should_be = item_target.get_materials_english_list()
stack_trace("[warning]. custom_materials should be [what_it_should_be].")
qdel(result)
// Inherit the new values passed to the component
/datum/component/bakeable/InheritComponent(datum/component/bakeable/new_comp, original, bake_result, required_bake_time, positive_result, use_large_steam_sprite)
if(!original)