From 234c3b76fbc5c8ea7bd2011cdf0be58a72cfc555 Mon Sep 17 00:00:00 2001 From: Remie Richards Date: Mon, 26 Oct 2015 02:28:55 +0000 Subject: [PATCH 1/2] 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 /* From a0e79284a14ff93f36527485cb9035036f1d1bbd Mon Sep 17 00:00:00 2001 From: Remie Richards Date: Mon, 26 Oct 2015 14:51:51 +0000 Subject: [PATCH 2/2] Shoulder Parrots no longer provide immunity to Slimes, rofl. --- .../mob/living/simple_animal/parrot.dm | 25 ++++++++++++------- .../mob/living/simple_animal/slime/powers.dm | 1 + 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index e45276d108e..4ec6e2f3bff 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -806,16 +806,11 @@ 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." + if(H.buckled_mob) //Already has a parrot, or is being eaten by a slime + continue + perch_on_human(H) return - src << "There is nobody nearby to sit on!" + src << "There is nobody nearby that you can sit on!" else icon_state = "parrot_fly" parrot_state = PARROT_WANDER @@ -828,6 +823,18 @@ +/mob/living/simple_animal/parrot/proc/perch_on_human(mob/living/carbon/human/H) + if(!H) + return + loc = get_turf(H) + H.buckle_mob(src, force=1) + 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." + + /mob/living/simple_animal/parrot/proc/toggle_mode() set name = "Toggle mode" set category = "Parrot" diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index cd900cf3776..bc64b2168c2 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -46,6 +46,7 @@ return 1 /mob/living/simple_animal/slime/proc/Feedon(mob/living/M) + M.unbuckle_mob(force=1) //Slimes rip other mobs (eg: shoulder parrots) off (Slimes Vs Slimes is already handled in CanFeedon()) if(M.buckle_mob(src, force=1)) M.visible_message("The [name] has latched onto [M]!", \ "The [name] has latched onto [M]!")