diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 42cc500c28..4963dff635 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -33,9 +33,9 @@ name = "\improper Parrot" desc = "The parrot squacks, \"It's a Parrot! BAWWK!\"" icon = 'icons/mob/animal.dmi' - icon_state = "chick" - icon_living = "chick" - icon_dead = "chick_dead" + icon_state = "parrot_fly" + icon_living = "parrot_fly" + icon_dead = "parrot_sit " pass_flags = PASSTABLE speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me") @@ -181,13 +181,16 @@ ..() if(client) return if(!stat && M.a_intent == "hurt") + + icon_state = "parrot_fly" //It is going to be flying regardless of whether it flees or attacks + if(parrot_state == PARROT_PERCH) parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched parrot_interest = M parrot_state = PARROT_SWOOP //The parrot just got hit, it WILL move, now to pick a direction.. - if(M.getMaxHealth() - M.health < 50) //Weakened mob? Fight back! + if(M.health < 50) //Weakened mob? Fight back! parrot_state |= PARROT_ATTACK else parrot_state |= PARROT_FLEE //Otherwise, fly like a bat out of hell! @@ -204,12 +207,14 @@ /mob/living/simple_animal/parrot/attack_animal(mob/living/simple_animal/M as mob) if(client) return + if(parrot_state == PARROT_PERCH) parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched if(M.melee_damage_upper > 0) parrot_interest = M parrot_state = PARROT_SWOOP | PARROT_ATTACK //Attack other animals regardless + icon_state = "parrot_fly" //Mobs with objects /mob/living/simple_animal/parrot/attackby(var/obj/item/O as obj, var/mob/user as mob) @@ -221,6 +226,7 @@ parrot_interest = user parrot_state = PARROT_SWOOP | PARROT_FLEE + icon_state = "parrot_fly" drop_held_item(0) return @@ -233,6 +239,7 @@ parrot_interest = null parrot_state = PARROT_WANDER //OWFUCK, Been shot! RUN LIKE HELL! + icon_state = "parrot_fly" drop_held_item(0) return @@ -253,44 +260,41 @@ //Every once in a while, the parrot picks one of the lines from the buffer and replaces an element of the 'speech' list. //Then it clears the buffer to make sure they dont magically remember something from hours ago. if(speech_buffer.len && prob(10)) -// world << "New speech being added!" if(speak.len) speak.Remove(pick(speak)) speak.Add(pick(speech_buffer)) clearlist(speech_buffer) -// world << "State: [parrot_state]" //Alright, here we go... down the slope //-----SLEEPING if(parrot_state == PARROT_PERCH) -// world << "Perched" if(parrot_perch.loc != src.loc) //Make sure someone hasnt moved our perch on us if(parrot_perch in view(src)) parrot_state = PARROT_SWOOP | PARROT_RETURN + icon_state = "parrot_fly" return else parrot_state = PARROT_WANDER + icon_state = "parrot_fly" return if(--parrot_sleep_dur) //Zzz -// world << "Perched: sleeping" return else -// world << "Perched: looking around" parrot_sleep_dur = parrot_sleep_max //This way we only call the loop below once every [sleep_max] ticks. parrot_interest = search_for_item() if(parrot_interest) emote("[src] looks in [parrot_interest]'s direction and takes flight.") parrot_state = PARROT_SWOOP | PARROT_STEAL + icon_state = "parrot_fly" return //-----WANDERING - This is basically a 'I dont know what to do yet' state else if(parrot_state == PARROT_WANDER) -// world << "Wander" //Stop movement, we'll set it later walk(src, 0) parrot_interest = null @@ -298,25 +302,20 @@ //Wander around aimlessly. This will help keep the loops from searches down //and possibly move the mob into a new are in view of something they can use if(prob(90)) -// world << "Wander: randomly" step(src, pick(cardinal)) return if(!held_item && !parrot_perch) //If we've got nothing to do.. look for something to do. -// world << "Wander: looking for perch or item" -// world << parrot_interest var/atom/movable/AM = search_for_perch_and_item() //This handles checking through lists so we know it's either a perch or stealable item if(AM) if(istype(AM, /obj/item) || isliving(AM)) //If stealable item parrot_interest = AM emote("[src] turns and flies towards [parrot_interest].") parrot_state = PARROT_SWOOP | PARROT_STEAL - world << parrot_interest return else //Else it's a perch parrot_perch = AM parrot_state = PARROT_SWOOP | PARROT_RETURN - world << parrot_interest return return @@ -325,32 +324,26 @@ return if(parrot_perch && parrot_perch in view(src)) -// world << "Wander: returning to perch" parrot_state = PARROT_SWOOP | PARROT_RETURN return else //Have an item but no perch? Find one! -// world << "Wander: looking for perch, holding item" parrot_perch = search_for_perch() if(parrot_perch) parrot_state = PARROT_SWOOP | PARROT_RETURN return //-----STEALING else if(parrot_state == (PARROT_SWOOP | PARROT_STEAL)) -// world << "Steal" walk(src,0) if(!parrot_interest || held_item) -// world << "Steal: lost interest or holding an item" parrot_state = PARROT_SWOOP | PARROT_RETURN return if(!(parrot_interest in view(src))) -// world << "Steal: interest not in view" parrot_state = PARROT_SWOOP | PARROT_RETURN return if(in_range(src, parrot_interest)) -// world << "Steal: stealing item" if(isliving(parrot_interest)) steal_from_mob() else @@ -360,7 +353,6 @@ parrot_state = PARROT_SWOOP | PARROT_RETURN return -// world << "Steal: swooping closer to target" var/oldloc = src.loc step_towards(src, get_step_towards(src,parrot_interest)) if(src.loc == oldloc) //Check if the mob is stuck @@ -370,22 +362,19 @@ //-----RETURNING TO PERCH else if(parrot_state == (PARROT_SWOOP | PARROT_RETURN)) -// world << "Return" walk(src, 0) if(!parrot_perch || !isturf(parrot_perch.loc)) //Make sure the perch exists and somehow isnt inside of something else. - world << "Return: no perch?" parrot_perch = null parrot_state = PARROT_WANDER return if(in_range(src, parrot_perch)) -// world << "Return: landing" src.loc = parrot_perch.loc drop_held_item() parrot_state = PARROT_PERCH + icon_state = "parrot_sit" return -// world << "Return: returning to perch" var/oldloc = src.loc step_towards(src, get_step_towards(src,parrot_perch)) if(src.loc == oldloc) //Check if the mob is stuck @@ -394,13 +383,10 @@ //-----FLEEING else if(parrot_state == (PARROT_SWOOP | PARROT_FLEE)) -// world << "Flee" walk(src,0) if(!parrot_interest || !isliving(parrot_interest)) //Sanity - world << "Flee: lost interest" parrot_state = PARROT_WANDER -// world << "Flee: fleeing" var/oldloc = src.loc step(src, get_step_away(src, parrot_interest)) if(src.loc == oldloc) //Check if the mob is stuck @@ -408,11 +394,9 @@ //-----ATTACKING else if(parrot_state == (PARROT_SWOOP | PARROT_ATTACK)) -// world << "Attack" //If we're attacking a nothing, an object, a turf or a ghost for some stupid reason, switch to wander if(!parrot_interest || !isliving(parrot_interest)) -// world << "Attack: lost interest" parrot_interest = null parrot_state = PARROT_WANDER return @@ -424,7 +408,6 @@ //If the mob we've been chasing/attacking dies or falls into crit, check for loot! if(L.stat) -// world << "Attack: looting body" parrot_interest = null if(!held_item) held_item = steal_from_ground() @@ -440,7 +423,6 @@ var/damage = rand(5,10) if(ishuman(parrot_interest)) -// world << "Attack: attacking human" var/mob/living/carbon/human/H = parrot_interest var/datum/organ/external/affecting = H.get_organ(ran_zone(pick(parrot_dam_zone))) @@ -448,14 +430,12 @@ emote(pick("pecks [H]'s [affecting]", "cuts [H]'s [affecting] with its talons")) else -// world << "Attack: attacking non-human" L.adjustBruteLoss(damage) emote(pick("pecks at [L]", "claws [L]")) return //Otherwise, fly towards the mob! else -// world << "Attack: swooping towards the mob" var/oldloc = src.loc step_towards(src, get_step_towards(src,parrot_interest)) if(src.loc == oldloc) //Check if the mob is stuck @@ -463,7 +443,6 @@ //-----STATE MISHAP else //This should not happen. If it does lets reset everything and try again -// world << "Unknown state: resetting to wander" walk(src,0) parrot_interest = null parrot_perch = null @@ -478,7 +457,7 @@ /mob/living/simple_animal/parrot/proc/search_for_item() for(var/atom/movable/AM in view(src)) for(var/path in desired_items) - if(parrot_perch && AM.loc == parrot_perch.loc) //Skip items we already stole + if(parrot_perch && AM.loc == parrot_perch.loc || AM.loc == src) //Skip items we already stole or are wearing continue if(istype(AM, path)) @@ -505,7 +484,7 @@ return AM for(var/item_path in desired_items) - if(parrot_perch && AM.loc == parrot_perch.loc) //Skip items we already stole + if(parrot_perch && AM.loc == parrot_perch.loc || AM.loc == src) //Skip items we already stole or are wearing continue if(istype(AM, item_path)) @@ -535,7 +514,7 @@ for(var/obj/item/I in view(1,src)) for(var/path in desired_items) - if(istype(I, path)) + if(istype(I, path) && I.loc != src) held_item = I I.loc = src visible_message("[src] grabs the [held_item]!", "\blue You grab the [held_item]!", "You hear the sounds of wings flapping furiously.") diff --git a/icons/mob/animal.dmi b/icons/mob/animal.dmi index 3491e5830b..0aedeee185 100644 Binary files a/icons/mob/animal.dmi and b/icons/mob/animal.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 16d33e8163..d60cb72636 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -106,7 +106,6 @@ #define FILE_DIR "code/modules/clothing/shoes" #define FILE_DIR "code/modules/clothing/spacesuits" #define FILE_DIR "code/modules/clothing/suits" -#define FILE_DIR "code/modules/clothing/ties" #define FILE_DIR "code/modules/clothing/under" #define FILE_DIR "code/modules/clothing/under/jobs" #define FILE_DIR "code/modules/critters" @@ -206,9 +205,7 @@ #define FILE_DIR "icons/vending_icons" #define FILE_DIR "interface" #define FILE_DIR "maps" -#define FILE_DIR "maps/backup" #define FILE_DIR "maps/RandomZLevels" -#define FILE_DIR "maps/RandomZLevels/backup" #define FILE_DIR "sound" #define FILE_DIR "sound/AI" #define FILE_DIR "sound/ambience" @@ -834,6 +831,7 @@ #include "code\modules\admin\verbs\mapping.dm" #include "code\modules\admin\verbs\massmodvar.dm" #include "code\modules\admin\verbs\modifyvariables.dm" +#include "code\modules\admin\verbs\one_click_antag.dm" #include "code\modules\admin\verbs\onlyone.dm" #include "code\modules\admin\verbs\playsound.dm" #include "code\modules\admin\verbs\possess.dm"