[MIRROR] some istype to macros (#9802)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-01-05 15:01:49 -07:00
committed by GitHub
parent 73486c399b
commit ed79946ade
409 changed files with 750 additions and 751 deletions

View File

@@ -279,7 +279,7 @@ var/list/all_technomancer_assistance = subtypesof(/datum/technomancer/assistance
if(H.stat || H.restrained())
return
if(!istype(H, /mob/living/carbon/human))
if(!ishuman(H))
return 1 //why does this return 1?
if(H != owner)

View File

@@ -116,7 +116,7 @@
summoned_mobs -= A
continue
// Now check for dead mobs who shouldn't be on the list.
if(istype(A, /mob/living))
if(isliving(A))
var/mob/living/L = A
if(L.stat == DEAD)
summoned_mobs -= L

View File

@@ -19,7 +19,7 @@
return 1
if(L.mind && technomancers.is_antagonist(L.mind)) // This should be done better since we might want opposing technomancers later.
return 1
if(istype(L, /mob/living/simple_mob)) // Mind controlled simple mobs count as allies too.
if(isanimal(L)) // Mind controlled simple mobs count as allies too.
var/mob/living/simple_mob/SM = L
if(owner in SM.friends)
return 1
@@ -58,4 +58,4 @@
if(!L.stat) // Don't want to target dead people or SSDs.
chosen_target = L
break
return chosen_target
return chosen_target

View File

@@ -14,12 +14,12 @@
aspect = ASPECT_TELE
/obj/item/spell/abjuration/on_ranged_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /mob/living) && pay_energy(500) && within_range(hit_atom))
if(isliving(hit_atom) && pay_energy(500) && within_range(hit_atom))
var/mob/living/L = hit_atom
var/mob/living/simple_mob/SM = null
//Bit of a roundabout typecheck, in order to test for two variables from two different mob types in one line.
if(istype(L, /mob/living/simple_mob))
if(isanimal(L))
SM = L
if(L.summoned || (SM && SM.supernatural) )
if(L.client) // Player-controlled mobs are immune to being killed by this.

View File

@@ -47,7 +47,7 @@
add_attack_logs(user,I,"Stolen with [src]")
qdel(src)
//Now let's try to teleport a living mob.
else if(istype(hit_atom, /mob/living))
else if(isliving(hit_atom))
var/mob/living/L = hit_atom
to_chat(L, span_danger("You are teleported towards \the [user]."))
var/datum/effect/effect/system/spark_spread/s1 = new /datum/effect/effect/system/spark_spread

View File

@@ -37,7 +37,7 @@
AI.wander = FALSE
AI.forget_everything()
if(istype(L, /mob/living/simple_mob))
if(isanimal(L))
var/mob/living/simple_mob/SM = L
SM.friends |= src.owner
@@ -55,7 +55,7 @@
AI.wander = initial(AI.wander)
AI.forget_everything()
if(istype(L, /mob/living/simple_mob))
if(isanimal(L))
var/mob/living/simple_mob/SM = L
SM.friends -= owner

View File

@@ -75,7 +75,7 @@
for(var/mob/living/L in view(owner))
// Spiders, carp... bears.
if(istype(L, /mob/living/simple_mob))
if(isanimal(L))
var/mob/living/simple_mob/SM = L
if(!is_ally(SM) && SM.has_AI() && SM.ai_holder.hostile)
hostile_mobs++
@@ -83,13 +83,13 @@
potential_spells |= /obj/item/spell/abjuration
// Always assume borgs are hostile.
if(istype(L, /mob/living/silicon/robot))
if(isrobot(L))
if(!istype(L, /mob/living/silicon/robot/drone)) // Drones are okay, however.
hostile_mobs++
potential_spells |= /obj/item/spell/projectile/ionic_bolt
// Finally we get to humanoids.
if(istype(L, /mob/living/carbon/human))
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(is_ally(H)) // Don't get scared by our apprentice.
continue

View File

@@ -49,11 +49,11 @@
qdel(src)
/obj/item/spell/insert/on_melee_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /mob/living))
if(isliving(hit_atom))
var/mob/living/L = hit_atom
insert(L,user)
/obj/item/spell/insert/on_ranged_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /mob/living))
if(isliving(hit_atom))
var/mob/living/L = hit_atom
insert(L,user)

View File

@@ -14,12 +14,12 @@
set_light(spell_light_range, spell_light_intensity, l_color = light_color)
/obj/item/spell/modifier/on_melee_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /mob/living))
if(isliving(hit_atom))
return on_add_modifier(hit_atom)
return FALSE
/obj/item/spell/modifier/on_ranged_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /mob/living))
if(isliving(hit_atom))
return on_add_modifier(hit_atom)
return FALSE

View File

@@ -29,7 +29,7 @@
to_chat(user, span_danger("\The [L]'s been dead for too long, even this function cannot replace cloning at this point."))
return 0
to_chat(user, span_notice("You stab \the [L] with a hidden integrated hypo, attempting to bring them back..."))
if(istype(L, /mob/living/simple_mob))
if(isanimal(L))
var/mob/living/simple_mob/SM = L
SM.health = SM.getMaxHealth() / 3
SM.set_stat(CONSCIOUS)