mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Being abducted by a contractor no longer recursively dumps contents of all of your boxes and belts, nor does it break your UI anymore (#86657)
## About The Pull Request Contractor abductions no longer recursively dump all of your items on the ground, instead only doing a single depth loop. Also fixed storage UI getting broken after being kidnapped due to using a wrong proc ## Why It's Good For The Game There's zero reason as for why it should behave like that other than just making recovery far more annoying. ## Changelog 🆑 fix: Your UI no longer breaks after being kidnapped by a contractor qol: Being kidnapped by a contractor no longer dumps all of your boxes and belts /🆑
This commit is contained in:
@@ -586,19 +586,19 @@
|
||||
hud_used.build_hand_slots()
|
||||
|
||||
//GetAllContents that is reasonable and not stupid
|
||||
/mob/living/proc/get_all_gear()
|
||||
var/list/processing_list = get_equipped_items(INCLUDE_POCKETS | INCLUDE_ACCESSORIES | INCLUDE_HELD)
|
||||
/mob/living/proc/get_all_gear(accessories = TRUE, recursive = TRUE)
|
||||
var/list/processing_list = get_equipped_items(INCLUDE_POCKETS | INCLUDE_HELD | (accessories ? INCLUDE_ACCESSORIES : NONE))
|
||||
list_clear_nulls(processing_list) // handles empty hands
|
||||
var/i = 0
|
||||
while(i < length(processing_list))
|
||||
var/atom/A = processing_list[++i]
|
||||
if(A.atom_storage)
|
||||
if(A.atom_storage && recursive)
|
||||
processing_list += A.atom_storage.return_inv()
|
||||
return processing_list
|
||||
|
||||
/// Returns a list of things that the provided mob has, including any storage-capable implants.
|
||||
/mob/living/proc/gather_belongings()
|
||||
var/list/belongings = get_all_gear()
|
||||
/mob/living/proc/gather_belongings(accessories = TRUE, recursive = TRUE)
|
||||
var/list/belongings = get_all_gear(accessories, recursive)
|
||||
for (var/obj/item/implant/storage/internal_bag in implants)
|
||||
belongings += internal_bag.contents
|
||||
return belongings
|
||||
|
||||
Reference in New Issue
Block a user