diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 835011d6c50..9b0eea9a5af 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -53,7 +53,7 @@ var/parrot_sleep_dur = 25 //Same as above, this is the var that physically counts down var/parrot_dam_zone = list("chest", "head", "l_arm", "l_leg", "r_arm", "r_leg") //For humans, select a bodypart to attack - var/parrot_speed = 5 //"Delay in world ticks between movement." Yeah, that's BS but it does directly affect movement. Higher number = slower. + var/parrot_speed = 5 //"Delay in world ticks between movement." according to byond. Yeah, that's BS but it does directly affect movement. Higher number = slower. var/parrot_been_shot = 0 //Parrots get a speed bonus after being shot. This will deincrement every Life() and at 0 the parrot will return to regular speed. var/list/speech_buffer = list() @@ -70,13 +70,12 @@ //These vars store their preffered perch and if they dont have one, what they can use as a perch var/obj/parrot_perch = null var/obj/desired_perches = list(/obj/structure/computerframe, /obj/structure/displaycase, \ - /obj/structure/closet, /obj/structure/filingcabinet, \ + /obj/structure/filingcabinet, /obj/machinery/teleport, \ /obj/machinery/computer, /obj/machinery/clonepod, \ /obj/machinery/dna_scanner, /obj/machinery/dna_scannernew, \ /obj/machinery/nuclearbomb, /obj/machinery/particle_accelerator, \ /obj/machinery/recharge_station, /obj/machinery/smartfridge, \ - /obj/machinery/suit_storage_unit, /obj/machinery/telecomms, \ - /obj/machinery/teleport) + /obj/machinery/suit_storage_unit, /obj/machinery/telecomms) //Parrots are kleptomaniacs. This variable ... stores the item a parrot is holding. var/obj/item/held_item = null @@ -412,10 +411,15 @@ return if(in_range(src, parrot_interest)) + if(isliving(parrot_interest)) steal_from_mob() - else - steal_from_ground() + + else //This should ensure that we only grab the item we want, and make sure it's not already collected on our perch + if(!parrot_perch || parrot_interest.loc != parrot_perch.loc) + held_item = parrot_interest + parrot_interest.loc = src + visible_message("[src] grabs the [held_item]!", "\blue You grab the [held_item]!", "You hear the sounds of wings flapping furiously.") parrot_interest = null parrot_state = PARROT_SWOOP | PARROT_RETURN @@ -583,7 +587,7 @@ if(I.loc != src && I.w_class <= 2) //If we have a perch and the item is sitting on it, continue - if(!client && parrot_perch && I.loc == parrot_perch) + if(!client && parrot_perch && I.loc == parrot_perch.loc) continue held_item = I