mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Fixes a closet harddel [MDB IGNORE] (#16235)
* Fixes a closet harddel (#69889) * Fixes a closet harddel PopulateContents is called in init which means that the closet is being qdelled but it's contents are not being properly removed when the prob(1) is called and it returns the qdel hint. This returns the qdel hint BEFORE parents init is called to stop this from happening * okay im just stupid * moves it * Update code/modules/unit_tests/closets.dm Co-authored-by: ShizCalev <ShizCalev@ users.noreply.github.com> * Update code/modules/unit_tests/closets.dm Co-authored-by: ShizCalev <ShizCalev@ users.noreply.github.com> * Fixes a closet harddel Co-authored-by: Seth Scherer <supernovaa41@gmx.com> Co-authored-by: ShizCalev <ShizCalev@ users.noreply.github.com>
This commit is contained in:
co-authored by
ShizCalev
Seth Scherer
parent
a21290f37b
commit
cfe2aacab0
@@ -9,10 +9,11 @@
|
||||
|
||||
for(var/closet_type in all_closets)
|
||||
var/obj/structure/closet/closet = allocate(closet_type)
|
||||
if(istype(closet_type, /obj/structure/closet/emcloset) && QDELETED(closet)) // this is here because the emcloset subtype has a chance of returning a qdel hint on initialize
|
||||
continue
|
||||
|
||||
// Copy is necessary otherwise closet.contents - immediate_contents returns an empty list
|
||||
var/list/immediate_contents = closet.contents.Copy()
|
||||
|
||||
closet.PopulateContents()
|
||||
var/contents_len = length(closet.contents)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user