mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
[NO GBP] Adds unit test checks for materials and processable comp & co. (#92194)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user