mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 12:01:47 +00:00
* Fixing issues with contents of some coded or mapped closets exceeding their storage capacity (#62221) * Fixing issues with contents of some coded or mapped closets exceeding their storage capacity Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com>
13 lines
690 B
Plaintext
13 lines
690 B
Plaintext
/// Checks that the length of the initial contents of a closet doesn't exceed its storage capacity
|
|
/datum/unit_test/closets
|
|
|
|
/datum/unit_test/closets/Run()
|
|
var/list/all_closets = subtypesof(/obj/structure/closet)
|
|
//Supply pods. They are sent, crashed, opened and never closed again. They also cause exceptions in nullspace.
|
|
all_closets -= typesof(/obj/structure/closet/supplypod)
|
|
|
|
for(var/closet_type in all_closets)
|
|
var/obj/structure/closet/closet = allocate(closet_type)
|
|
var/contents_len = length(closet.contents)
|
|
TEST_ASSERT(contents_len <= closet.storage_capacity, "Initial Contents of [closet.type] ([contents_len]) exceed its storage capacity ([closet.storage_capacity]).")
|