diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index 201e29fabc2..2bb4340dfb1 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -35,13 +35,14 @@ #define ITEM_SLOT_NECK (1<<12) #define ITEM_SLOT_HANDS (1<<13) #define ITEM_SLOT_BACKPACK (1<<14) -#define ITEM_SLOT_SUITSTORE (1<<15) -#define ITEM_SLOT_LPOCKET (1<<16) -#define ITEM_SLOT_RPOCKET (1<<17) -#define ITEM_SLOT_HANDCUFFED (1<<18) -#define ITEM_SLOT_LEGCUFFED (1<<19) +#define ITEM_SLOT_LHANDSTORE (1<<15) +#define ITEM_SLOT_SUITSTORE (1<<16) +#define ITEM_SLOT_LPOCKET (1<<17) +#define ITEM_SLOT_RPOCKET (1<<18) +#define ITEM_SLOT_HANDCUFFED (1<<19) +#define ITEM_SLOT_LEGCUFFED (1<<20) -#define SLOTS_AMT 20 // Keep this up to date! +#define SLOTS_AMT 21 // Keep this up to date! //SLOT GROUP HELPERS #define ITEM_SLOT_POCKETS (ITEM_SLOT_LPOCKET|ITEM_SLOT_RPOCKET) diff --git a/code/modules/jobs/job_types/lawyer.dm b/code/modules/jobs/job_types/lawyer.dm index aeb92f1bba3..ed827c848d7 100644 --- a/code/modules/jobs/job_types/lawyer.dm +++ b/code/modules/jobs/job_types/lawyer.dm @@ -24,20 +24,48 @@ name = "Lawyer" jobtype = /datum/job/lawyer + back = null + box = null//need to put it in backpack_contents instead since our backpack may not be on our back belt = /obj/item/pda/lawyer ears = /obj/item/radio/headset/headset_srvsec uniform = /obj/item/clothing/under/rank/civilian/lawyer/bluesuit suit = /obj/item/clothing/suit/toggle/lawyer shoes = /obj/item/clothing/shoes/laceup - l_hand = /obj/item/storage/briefcase/lawyer l_pocket = /obj/item/laser_pointer r_pocket = /obj/item/clothing/accessory/lawyers_badge chameleon_extras = /obj/item/stamp/law + //see pre_equip for department gear + backpack_contents = list(/obj/item/storage/box/survival) //transfered to briefcase contents if they have it + var/list/briefcase_contents = list() + /datum/outfit/job/lawyer/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - ..() + switch(H.backpack) + if(GBACKPACK) + back = /obj/item/storage/backpack //Grey backpack + if(GSATCHEL) + back = /obj/item/storage/backpack/satchel //Grey satchel + if(GDUFFELBAG) + back = /obj/item/storage/backpack/duffelbag //Grey Duffel bag + if(LSATCHEL) + back = /obj/item/storage/backpack/satchel/leather //Leather Satchel + else //departmental + back = null //Department gear is a suitcase for lawyer + l_hand = /obj/item/storage/briefcase/lawyer + briefcase_contents.Add(backpack_contents) + backpack_contents = list() + + //converts the uniform string into the path we'll wear, whether it's the skirt or regular variant + var/holder + if(H.jumpsuit_style == PREF_SKIRT) + holder = "[uniform]/skirt" + if(!text2path(holder)) + holder = "[uniform]" + else + holder = "[uniform]" + uniform = text2path(holder) if(visualsOnly) return @@ -46,3 +74,15 @@ if(J.lawyers>1) uniform = /obj/item/clothing/under/rank/civilian/lawyer/purpsuit suit = /obj/item/clothing/suit/toggle/lawyer/purple + +/datum/outfit/job/lawyer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + ..() + if(visualsOnly) + return + if(briefcase_contents) + for(var/path in briefcase_contents) + var/number = briefcase_contents[path] + if(!isnum(number))//Default to 1 + number = 1 + for(var/i in 1 to number) + H.equip_to_slot_or_del(new path(H),ITEM_SLOT_LHANDSTORE, TRUE) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 17b05e64467..d94faeddb0a 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -989,6 +989,11 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(H.back) if(SEND_SIGNAL(H.back, COMSIG_TRY_STORAGE_CAN_INSERT, I, H, TRUE)) return TRUE + if(ITEM_SLOT_LHANDSTORE) + var/obj/item/held_left = H.get_held_items_for_side(LEFT_HANDS) + if(held_left) + if(SEND_SIGNAL(held_left, COMSIG_TRY_STORAGE_CAN_INSERT, I, H, TRUE)) + return TRUE return FALSE return FALSE //Unsupported slot diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index a27d048a751..ddcf152340a 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -74,6 +74,10 @@ if(ITEM_SLOT_BACKPACK) if(!back || !SEND_SIGNAL(back, COMSIG_TRY_STORAGE_INSERT, I, src, TRUE)) not_handled = TRUE + if(ITEM_SLOT_LHANDSTORE) + var/obj/item/held_left = get_held_items_for_side(LEFT_HANDS) + if(!held_left || !SEND_SIGNAL(held_left, COMSIG_TRY_STORAGE_INSERT, I, src, TRUE)) + not_handled = TRUE else not_handled = TRUE