diff --git a/code/datums/components/storage/concrete/pockets.dm b/code/datums/components/storage/concrete/pockets.dm index 4a1d8664ec4..01209666f63 100644 --- a/code/datums/components/storage/concrete/pockets.dm +++ b/code/datums/components/storage/concrete/pockets.dm @@ -33,6 +33,25 @@ /datum/component/storage/concrete/pockets/small/fedora/detective attack_hand_interact = TRUE // so the detectives would discover pockets in their hats +/datum/component/storage/concrete/pockets/chefhat + attack_hand_interact = TRUE + max_items = 1 + max_w_class = WEIGHT_CLASS_NORMAL + +/datum/component/storage/concrete/pockets/chefhat/Initialize() + . = ..() + set_holdable(list( + /obj/item/clothing/head/mob_holder + )) + +/datum/component/storage/concrete/pockets/chefhat/can_be_inserted(obj/item/I, stop_messages, mob/M) + . = ..() + if(istype(I,/obj/item/clothing/head/mob_holder)) + var/obj/item/clothing/head/mob_holder/mausholder = I + if(locate(/mob/living/simple_animal/mouse) in mausholder.contents) + return TRUE + return FALSE + /datum/component/storage/concrete/pockets/shoes attack_hand_interact = FALSE quickdraw = TRUE diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index c6083203853..a70fe3f57e5 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -13,6 +13,7 @@ strip_delay = 10 equip_delay_other = 10 dynamic_hair_suffix = "" + pocket_storage_component_path = /datum/component/storage/concrete/pockets/chefhat dog_fashion = /datum/dog_fashion/head/chef /obj/item/clothing/head/chefhat/suicide_act(mob/user) @@ -24,6 +25,12 @@ playsound(user, 'sound/machines/ding.ogg', 50, TRUE) return(FIRELOSS) +/obj/item/clothing/head/chefhat/relaymove(mob/user, direction) + if(!istype(user, /mob/living/simple_animal/mouse) || !isliving(loc) || !prob(20)) + return + var/mob/living/L = loc + step_towards(L, get_step(L, direction)) + //Captain /obj/item/clothing/head/caphat name = "captain's hat"