diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 4363f796d47..08f1239281c 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -395,10 +395,10 @@ In all, this is a lot like the monkey code. /N
dat += {"
-
Close
+
Close
"}
- user << browse(dat, "window=mob[name];size=325x500")
- onclose(user, "mob[name]")
+ user << browse(dat, "window=mob\ref[src];size=325x500")
+ onclose(user, "mob\ref[src]")
/mob/living/carbon/alien/humanoid/Topic(href, href_list)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 75216157702..0cca5b54265 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -495,10 +495,10 @@
dat += {"
-
Close
+
Close
"}
- user << browse(dat, "window=mob[name];size=325x500")
- onclose(user, "mob[name]")
+ user << browse(dat, "window=mob\ref[src];size=325x500")
+ onclose(user, "mob\ref[src]")
/mob/living/carbon/Topic(href, href_list)
..()
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index c09a43984e1..6bf907b705d 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -374,15 +374,16 @@
if(legcuffed)
dat += "
Legcuffed"
if(w_uniform)
- dat += "
Empty Pockets"
+ dat += "
Left Pocket ([l_store ? "Full" : "Empty"])"
+ dat += " - Right Pocket ([r_store ? "Full" : "Empty"])"
dat += {"
-
Close
+
Close
"}
- user << browse(dat, "window=mob[name];size=340x480")
- onclose(user, "mob[name]")
+ user << browse(dat, "window=mob\ref[src];size=340x480")
+ onclose(user, "mob\ref[src]")
// called when something steps onto a human
@@ -478,15 +479,38 @@
//strip panel
if(!usr.stat && usr.canmove && !usr.restrained() && in_range(src, usr))
if(href_list["pockets"])
+
+ var/pocket_side = href_list["pockets"]
+ var/pocket_id = (pocket_side == "right" ? slot_r_store : slot_l_store)
+ var/obj/item/pocket_item = (pocket_id == slot_r_store ? src.r_store : src.l_store)
+ var/obj/item/place_item = usr.get_active_hand() // Item to place in the pocket, if it's empty
+
//visible_message("[usr] tries to empty [src]'s pockets.", \
"[usr] tries to empty [src]'s pockets.") // Pickpocketing!
- usr << "You try to empty [src]'s pockets."
- if(do_mob(usr, src, STRIP_DELAY * 0.5))
- u_equip(r_store)
- u_equip(l_store)
+ if(pocket_item)
+ usr << "You try to empty [src]'s [pocket_side] pocket."
+ else if(place_item && place_item.mob_can_equip(src, pocket_id, 1))
+ usr << "You try to place [place_item] into [src]'s [pocket_side] pocket."
+ else
+ return
+
+ if(do_mob(usr, src, STRIP_DELAY))
+ if(pocket_item)
+ u_equip(pocket_item)
+ else
+ if(place_item)
+ usr.u_equip(place_item)
+ equip_to_slot_if_possible(place_item, pocket_id, 0, 1)
+
+ // Update strip window
+ if(usr.machine == src && in_range(src, usr))
+ show_inv(usr)
+
+
+
else
// Display a warning if the user mocks up
- src << "You feel your pockets being fumbled with!"
+ src << "You feel your [pocket_side] pocket being fumbled with!"
if(href_list["criminal"])
if(istype(usr, /mob/living/carbon/human))
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 05f6d4ad9fa..25db03a46ab 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -238,10 +238,10 @@ var/list/slot_equipment_priority = list( \