[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

@@ -365,11 +365,11 @@
/obj/item/projectile/beam/stun/disabler/on_hit(atom/target, blocked = 0, def_zone)
. = ..(target, blocked, def_zone)
if(. && istype(target, /mob/living/silicon/robot) && prob(agony))
if(. && isrobot(target) && prob(agony))
var/mob/living/silicon/robot/R = target
var/drainamt = agony * (rand(5, 15) / 10)
R.drain_power(0, 0, drainamt)
if(istype(firer, /mob/living/silicon/robot)) // Mischevious sappers, the swarm drones are.
if(isrobot(firer)) // Mischevious sappers, the swarm drones are.
var/mob/living/silicon/robot/A = firer
if(A.cell)
A.cell.give(drainamt * 2)
@@ -562,7 +562,7 @@
impact_type = /obj/effect/projectile/impact/medigun
/obj/item/projectile/beam/medigun/on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
if(ishuman(target))
var/mob/living/carbon/human/M = target
if(M.health < M.maxHealth)
var/obj/effect/overlay/pulse = new /obj/effect/overlay(get_turf(M))

View File

@@ -12,13 +12,13 @@
wabbajack(change)
/obj/item/projectile/change/proc/wabbajack(var/mob/M)
if(istype(M, /mob/living) && M.stat != DEAD)
if(isliving(M) && M.stat != DEAD)
if(M.transforming)
return
if(M.has_brain_worms())
return //Borer stuff - RR
if(istype(M, /mob/living/silicon/robot))
if(isrobot(M))
var/mob/living/silicon/robot/Robot = M
if(Robot.mmi)
qdel(Robot.mmi)

View File

@@ -167,13 +167,13 @@
done_mob_unique = TRUE
success = TRUE
if(I_HURT)
if(prob(10) && istype(L, /mob/living/carbon/human))
if(prob(10) && ishuman(L))
to_chat(L, span_warning("\The [src] rips at your hands!"))
ranged_disarm(L)
success = TRUE
done_mob_unique = TRUE
if(I_DISARM)
if(prob(disarm_chance) && istype(L, /mob/living/carbon/human))
if(prob(disarm_chance) && ishuman(L))
ranged_disarm(L)
else
L.visible_message(span_danger("\The [src] sends \the [L] stumbling backwards."))

View File

@@ -83,7 +83,7 @@
var/energetic_impact = 0 //Does this fuelrod cause a bright flash on impact with a mob?
/obj/item/projectile/bullet/magnetic/fuelrod/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null) //Future-proofing. Special effects for impact.
if(istype(target,/mob/living))
if(isliving(target))
var/mob/living/V = target
if(detonate_mob)
if(V.loc)
@@ -154,7 +154,7 @@
hud_state = "rocket_thermobaric"
/obj/item/projectile/bullet/magnetic/fuelrod/supermatter/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null) //You cannot touch the supermatter without disentigrating. Assumedly, this is true for condensed rods of it flying at relativistic speeds.
if(istype(target,/turf/simulated/wall) || istype(target,/mob/living))
if(istype(target,/turf/simulated/wall) || isliving(target))
target.visible_message(span_danger("The [src] burns a perfect hole through \the [target] with a blinding flash!"))
playsound(target, 'sound/effects/teleport.ogg', 40, 0)
return ..(target, blocked, def_zone)

View File

@@ -130,7 +130,7 @@
playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))\
if(!M.stat && !isAI(M))\
shake_camera(M, 3, 1)
qdel(src)
return 1