mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-13 11:12:14 +00:00
* Save 0.4s by shaving off a lot of smaller init costs * update modular Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
17 lines
724 B
Plaintext
17 lines
724 B
Plaintext
/// Makes sure that no orderable items have dynamic descriptions, if they
|
|
/// don't explicitly set a description.
|
|
/datum/unit_test/orderable_item_descriptions
|
|
|
|
/datum/unit_test/orderable_item_descriptions/Run()
|
|
for (var/datum/orderable_item/orderable_item as anything in subtypesof(/datum/orderable_item))
|
|
if (!isnull(initial(orderable_item.desc)))
|
|
continue
|
|
|
|
var/item_path = initial(orderable_item.item_path)
|
|
|
|
var/obj/item/item_instance = new item_path
|
|
var/initial_desc = initial(item_instance.desc)
|
|
|
|
if (item_instance.desc != initial_desc)
|
|
Fail("[orderable_item] has an item ([item_path]) that has a dynamic description. [item_instance.desc] (dynamic description) != [initial_desc] (initial description)")
|