mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-01 20:42:08 +00:00
* Fixing a number of issues with burial mounds and abandoned crates. (#64482) Ok, I'm fixing a few issues with certain crates, namely the abandoned one and the burial mound: An oversight with the skittish trait letting players dive into burial mounds, which are technically a subtype of crates. A runtime that made abandoned crates not update their lock lights when unlocked (the togglelock call was missing the user arg). This one was my fault. An oversight with abandoned crates not resetting the number of attempts left and not nulling the last attempted code when re-locked. Idem. Burial mounds somehow getting lock lights overlays. Also i'm taking this opportunity to make the closets unit test not early return at the first encountered failure (at the time I made it I didn't know TEST_ASSERT & co would early return on failure) since we want this unit test to finish looping through all non-blacklisted closets. * Fixing a number of issues with burial mounds and abandoned crates. Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
14 lines
688 B
Plaintext
14 lines
688 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)
|
|
if(contents_len > closet.storage_capacity)
|
|
Fail("Initial Contents of [closet.type] ([contents_len]) exceed its storage capacity ([closet.storage_capacity]).")
|