VS: Changes for AI refactor, makes voremobs behave more sane

This commit is contained in:
Aronai Sieyes
2020-04-26 23:44:29 -04:00
parent 8ec31c9aa4
commit 93f9d2f552
3 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
/datum/ai_holder/can_see_target(atom/movable/the_target, view_range = vision_range)
if(the_target && isbelly(the_target.loc))
return FALSE
return ..()

View File

@@ -201,6 +201,17 @@
var/taste var/taste
if(can_taste && (taste = M.get_taste_message(FALSE))) if(can_taste && (taste = M.get_taste_message(FALSE)))
to_chat(owner, "<span class='notice'>[M] tastes of [taste].</span>") to_chat(owner, "<span class='notice'>[M] tastes of [taste].</span>")
//Stop AI processing in bellies
if(M.ai_holder)
M.ai_holder.go_sleep()
// Called whenever an atom leaves this belly
/obj/belly/Exited(atom/movable/thing, atom/OldLoc)
. = ..()
if(isliving(thing) && !isbelly(thing.loc))
var/mob/living/L = thing
if((L.stat != DEAD) && L.ai_holder)
L.ai_holder.go_wake()
// Release all contents of this belly into the owning mob's location. // Release all contents of this belly into the owning mob's location.
// If that location is another mob, contents are transferred into whichever of its bellies the owning mob is in. // If that location is another mob, contents are transferred into whichever of its bellies the owning mob is in.

View File

@@ -1616,6 +1616,7 @@
#include "code\modules\ai\ai_holder_movement.dm" #include "code\modules\ai\ai_holder_movement.dm"
#include "code\modules\ai\ai_holder_pathfinding.dm" #include "code\modules\ai\ai_holder_pathfinding.dm"
#include "code\modules\ai\ai_holder_targeting.dm" #include "code\modules\ai\ai_holder_targeting.dm"
#include "code\modules\ai\ai_holder_targeting_vr.dm"
#include "code\modules\ai\interfaces.dm" #include "code\modules\ai\interfaces.dm"
#include "code\modules\ai\say_list.dm" #include "code\modules\ai\say_list.dm"
#include "code\modules\ai\ai_holder_subtypes\simple_mob_ai.dm" #include "code\modules\ai\ai_holder_subtypes\simple_mob_ai.dm"