From 234c3b76fbc5c8ea7bd2011cdf0be58a72cfc555 Mon Sep 17 00:00:00 2001 From: Remie Richards Date: Mon, 26 Oct 2015 02:28:55 +0000 Subject: [PATCH] Player Parrots can now sit on Human's shoulders. --- .../mob/living/simple_animal/parrot.dm | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index bb93b464481..e45276d108e 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -112,7 +112,8 @@ /mob/living/simple_animal/parrot/proc/steal_from_mob, \ /mob/living/simple_animal/parrot/verb/drop_held_item_player, \ /mob/living/simple_animal/parrot/proc/perch_player, \ - /mob/living/simple_animal/parrot/proc/toggle_mode) + /mob/living/simple_animal/parrot/proc/toggle_mode, + /mob/living/simple_animal/parrot/proc/perch_mob_player) /mob/living/simple_animal/parrot/death(gibbed) @@ -120,6 +121,13 @@ held_item.loc = src.loc held_item = null walk(src,0) + + if(buckled) + buckled.buckled_mob = null + buckled = null + pixel_x = initial(pixel_x) + pixel_y = initial(pixel_y) + ..(gibbed) /mob/living/simple_animal/parrot/Stat() @@ -787,6 +795,39 @@ src << "There is no perch nearby to sit on!" return + +/mob/living/simple_animal/parrot/proc/perch_mob_player() + set name = "Sit on Human's Shoulder" + set category = "Parrot" + set desc = "Sit on a nice comfy human being!" + + if(stat || !client) + return + + if(icon_state == "parrot_fly") + for(var/mob/living/carbon/human/H in view(src,1)) + loc = get_turf(H) + H.buckled_mob = src + buckled = H + pixel_y = 9 + pixel_x = pick(-8,8) //pick left or right shoulder + icon_state = "parrot_sit" + parrot_state = PARROT_PERCH + src << "You sit on [H]'s shoulder." + return + src << "There is nobody nearby to sit on!" + else + icon_state = "parrot_fly" + parrot_state = PARROT_WANDER + if(buckled) + src << "You are no longer sitting on [buckled]'s shoulder." + buckled.buckled_mob = null + buckled = null + pixel_x = initial(pixel_x) + pixel_y = initial(pixel_y) + + + /mob/living/simple_animal/parrot/proc/toggle_mode() set name = "Toggle mode" set category = "Parrot" @@ -801,6 +842,7 @@ else melee_damage_upper = parrot_damage_upper a_intent = "harm" + src << "You will now [a_intent] others..." return /*