From 8f91f8a2fcaa1c75cd9a7e5a8783b2d6e7f29e54 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Thu, 5 Sep 2019 19:39:27 -0400 Subject: [PATCH] last tweak --- code/modules/customitems/item_defines.dm | 25 +++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index b3d2a022648..894d9a30ff2 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -238,17 +238,20 @@ force = 2 /obj/item/fluff/dogwhistle/attack_self(mob/user) - user.visible_message("[user] blows on the whistle, but no sound comes out.", "You blow on the whistle, but don't hear anything.") - spawn(20) - var/mob/living/simple_animal/pet/dog/corgi/C = new /mob/living/simple_animal/pet/dog/corgi(get_turf(user)) - var/obj/item/clothing/head/det_hat/D = new /obj/item/clothing/head/det_hat(C) - D.flags |= NODROP - C.place_on_head(D) - C.name = "Detective Sax" - C.real_name = "Detective Sax" - C.visible_message("[C] suddenly winks into existence at [user]'s feet!") - to_chat(user, "[src] crumbles to dust in your hands!") - qdel(src) + user.visible_message("[user] blows on the whistle, but no sound comes out.", "You blow on the whistle, but don't hear anything.") + addtimer(CALLBACK(src, .proc/summon_sax, user), 20) + +/obj/item/fluff/dogwhistle/proc/summon_sax(mob/user) + var/mob/living/simple_animal/pet/dog/corgi/C = new /mob/living/simple_animal/pet/dog/corgi(get_turf(user)) + C.name = "Detective Sax" + C.real_name = "Detective Sax" + var/obj/item/clothing/head/det_hat/D = new + D.flags |= NODROP + C.place_on_head(D) + C.visible_message("[C] suddenly winks into existence at [user]'s feet!") + to_chat(user, "[src] crumbles to dust in your hands!") + user.drop_item() + qdel(src) /obj/item/storage/toolbox/fluff/lunchbox //godoforeos: Jason Conrad name = "lunchpail"