mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
VS: Changes for AI refactor, makes voremobs behave more sane
This commit is contained in:
5
code/modules/ai/ai_holder_targeting_vr.dm
Normal file
5
code/modules/ai/ai_holder_targeting_vr.dm
Normal 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 ..()
|
||||||
@@ -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.
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user