From c69cb714f2f757f5368a376510cd3ab206d88096 Mon Sep 17 00:00:00 2001 From: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Date: Sat, 18 Jul 2020 14:37:29 -0400 Subject: [PATCH] You can now store mice in your chef's hat. (#52253) * Is that a mouse in your chef's hat. * yeah that sounds about right * Sure thing boss. --- .../components/storage/concrete/pockets.dm | 19 +++++++++++++++++++ code/modules/clothing/head/jobs.dm | 7 +++++++ 2 files changed, 26 insertions(+) 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"