diff --git a/code/modules/ai/ai_holder_targeting.dm b/code/modules/ai/ai_holder_targeting.dm index bf546bc2832..1e86d22b344 100644 --- a/code/modules/ai/ai_holder_targeting.dm +++ b/code/modules/ai/ai_holder_targeting.dm @@ -252,6 +252,10 @@ on_attacked(attacker) return FALSE + if(holder.resting) // I can't kill someone while I'm laying down! + ai_log("react_to_attack() : AI is resting. Getting up up.", AI_LOG_TRACE) + holder.lay_down() + if(stance == STANCE_SLEEP) // If we're asleep, try waking up if someone's wailing on us. ai_log("react_to_attack() : AI is asleep. Waking up.", AI_LOG_TRACE) go_wake() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/catslug.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/catslug.dm index a9181e8329b..79007a082d8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/catslug.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/catslug.dm @@ -137,6 +137,17 @@ to_chat(user, "\The [user] feeds \the [O] to you.") playsound(src, 'sound/items/eatfood.ogg', 75, 1) +/mob/living/simple_mob/vore/alienanimals/catslug/attack_hand(mob/living/carbon/human/M as mob) + if(stat == DEAD) + return ..() + if(M.a_intent == I_HELP && resting) + M.visible_message("\The [M.name] shakes \the [src] awake from their nap.","You shake \the [src] awake!") + playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + lay_down() + ai_holder.go_wake() + return + return ..() + /mob/living/simple_mob/vore/alienanimals/catslug/Life() . = ..() if(nutrition < 150) @@ -178,19 +189,32 @@ color = newcolor picked_color = TRUE -/datum/ai_holder/simple_mob/melee/evasive/catslug/handle_wander_movement() - if(holder.client) - return +/datum/ai_holder/simple_mob/melee/evasive/catslug/proc/consider_awakening() if(holder.resting) - if(prob(5)) - holder.lay_down() - return - if(prob(0.5)) holder.lay_down() + go_wake() + +/datum/ai_holder/simple_mob/melee/evasive/catslug/handle_wander_movement() + if(holder.client || holder.resting) return - return ..() + else if(prob(0.5)) + holder.lay_down() + go_sleep() + addtimer(CALLBACK(src, .proc/consider_awakening), rand(1 MINUTE, 5 MINUTES), TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE) + else + return ..() + /datum/ai_holder/simple_mob/melee/evasive/catslug/on_hear_say(mob/living/speaker, message) + if(holder.client) + return + if(!speaker.client) + return + if(findtext(message, "psps") && stance == STANCE_IDLE) + set_follow(speaker, follow_for = 5 SECONDS) + +/mob/living/simple_mob/vore/alienanimals/catslug/horrible +/datum/ai_holder/simple_mob/melee/evasive/catslug/horrible/on_hear_say(mob/living/speaker, message) //this was an accident originally but it was very funny so here you go if(holder.client) return if(!speaker.client)