mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +00:00
[MIRROR] some istype to macros (#9802)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
73486c399b
commit
ed79946ade
@@ -50,7 +50,7 @@
|
||||
if(!ai_holder)
|
||||
log_debug("[src] could not initialize ai_holder of type [ai_holder_type]")
|
||||
return
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
new /datum/hud(H)
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
return FALSE // Turrets don't give a fuck so neither will we.
|
||||
/*
|
||||
// Find a nice way of doing this later.
|
||||
if(istype(the_target, /mob/living/simple_mob) && istype(holder, /mob/living/simple_mob))
|
||||
if(isanimal(the_target) && isanimal(holder))
|
||||
var/mob/living/simple_mob/us = holder
|
||||
var/mob/living/simple_mob/them = target
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
return
|
||||
|
||||
var/has_hands = TRUE
|
||||
if(istype(holder, /mob/living/simple_mob))
|
||||
if(isanimal(holder))
|
||||
var/mob/living/simple_mob/S = holder
|
||||
has_hands = S.has_hands
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
if(target)
|
||||
if(istype(target, /mob/living/simple_mob/slime/xenobio)) //Don't call reinforcements for internal disputes
|
||||
return
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(istype(H.species, /datum/species/monkey)) //Or for food
|
||||
return
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
// The holder's attack changes based on intent. This lets the AI choose what effect is desired.
|
||||
/datum/ai_holder/simple_mob/xenobio_slime/pre_melee_attack(atom/A)
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
var/mob/living/simple_mob/slime/xenobio/my_slime = holder
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
my_slime.a_intent = I_HURT // Otherwise robust them.
|
||||
|
||||
/datum/ai_holder/simple_mob/xenobio_slime/closest_distance(atom/movable/AM)
|
||||
if(istype(AM, /mob/living))
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
|
||||
Reference in New Issue
Block a user