More istypes replaced with helpers (#20767)

* shouldn't you be merging these by now

* my oh my do we have a lot of these

* a fellow pedantic shit
This commit is contained in:
Joan Lung
2016-10-02 20:40:13 -04:00
committed by oranges
parent de19e36a51
commit b5b4037e2e
87 changed files with 185 additions and 175 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
..()
if(!H)
return
if(istype(H, /mob/dead/observer) && !affect_ghosts)
if(isobserver(H) && !affect_ghosts)
return
if(!istype(H, /mob) && mobs_only)
return
@@ -110,7 +110,7 @@
/obj/item/device/radio/interact(mob/user)
if (..())
return
if(b_stat && !istype(user, /mob/living/silicon/ai))
if(b_stat && !isAI(user))
wires.interact(user)
else
ui_interact(user)
+2 -2
View File
@@ -1035,7 +1035,7 @@
if(!..())
playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)
for(var/mob/M in urange(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))\
if(!M.stat && !isAI(M))
shake_camera(M, 3, 1)
qdel(src)
@@ -1082,7 +1082,7 @@
user.visible_message("<span class='warning'>[user] presses the big red button.</span>", "<span class='notice'>You press the button, it plays a loud noise!</span>", "<span class='italics'>The button clicks loudly.</span>")
playsound(src, 'sound/effects/explosionfar.ogg', 50, 0, surround = 0)
for(var/mob/M in urange(10, src)) // Checks range
if(!M.stat && !istype(M, /mob/living/silicon/ai)) // Checks to make sure whoever's getting shaken is alive/not the AI
if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI
sleep(8) // Short delay to match up with the explosion sound
shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second.
+1 -1
View File
@@ -82,7 +82,7 @@
if ((M.client && M.machine == src))
is_in_use = 1
src.attack_hand(M)
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot) || IsAdminGhost(usr))
if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr))
if (!(usr in nearby))
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
is_in_use = 1
+1 -1
View File
@@ -81,7 +81,7 @@
var/adjusted_climb_time = climb_time
if(user.restrained()) //climbing takes twice as long when restrained.
adjusted_climb_time *= 2
if(istype(user, /mob/living/carbon/alien))
if(isalien(user))
adjusted_climb_time *= 0.25 //aliens are terrifyingly fast
structureclimber = user
if(do_mob(user, user, adjusted_climb_time))