[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

@@ -128,7 +128,7 @@
set name = "Jingle Bell"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
if(!jingled)

View File

@@ -121,7 +121,7 @@
set name = "Holster"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
//can't we just use src here?

View File

@@ -73,7 +73,7 @@
if (!..())
return 0
if(LAZYLEN(species_restricted) && istype(M,/mob/living/carbon/human))
if(LAZYLEN(species_restricted) && ishuman(M))
var/exclusive = null
var/wearable = null
var/mob/living/carbon/human/H = M
@@ -226,7 +226,7 @@
/obj/item/clothing/ears/attack_hand(mob/user as mob)
if (!user) return
if (src.loc != user || !istype(user,/mob/living/carbon/human))
if (src.loc != user || !ishuman(user))
..()
return
@@ -909,7 +909,7 @@
/obj/item/clothing/under/proc/update_rolldown_status()
var/mob/living/carbon/human/H
if(istype(src.loc, /mob/living/carbon/human))
if(ishuman(src.loc))
H = src.loc
var/icon/under_icon
@@ -932,7 +932,7 @@
/obj/item/clothing/under/proc/update_rollsleeves_status()
var/mob/living/carbon/human/H
if(istype(src.loc, /mob/living/carbon/human))
if(ishuman(src.loc))
H = src.loc
var/icon/under_icon
@@ -1017,7 +1017,7 @@
set name = "Roll Down Jumpsuit"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
update_rolldown_status()
@@ -1050,7 +1050,7 @@
set name = "Roll Up Sleeves"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
update_rollsleeves_status()

View File

@@ -120,7 +120,7 @@
set category = "Object"
set src in usr
if(!istype(usr, /mob/living))
if(!isliving(usr))
return
if(usr.stat)

View File

@@ -35,7 +35,7 @@
if(istype(I,/obj/item/holder/micro))
var/full = 0
for(var/mob/M in src)
if(istype(M,/mob/living/voice)) //Don't count voices as people!
if(isvoice(M)) //Don't count voices as people!
continue
full++
if(full >= 2)
@@ -53,7 +53,7 @@
/obj/item/clothing/shoes/attack_self(var/mob/user)
for(var/mob/M in src)
if(istype(M,/mob/living/voice)) //Don't knock voices out!
if(isvoice(M)) //Don't knock voices out!
continue
M.forceMove(get_turf(user))
to_chat(M, span_warning("[user] shakes you out of \the [src]!"))
@@ -63,7 +63,7 @@
/obj/item/clothing/shoes/container_resist(mob/living/micro)
var/mob/living/carbon/human/macro = loc
if(istype(micro,/mob/living/voice)) //Voices shouldn't be able to resist but we have this here just in case.
if(isvoice(micro)) //Voices shouldn't be able to resist but we have this here just in case.
return
if(!istype(macro))
to_chat(micro, span_notice("You start to climb out of [src]!"))
@@ -115,7 +115,7 @@
if(ishuman(src.loc)) //Is this on a person?
var/mob/living/carbon/human/H = src.loc
if(istype(user,/mob/living/voice)) //Is this a possessed item? Spooky. It can move on it's own!
if(isvoice(user)) //Is this a possessed item? Spooky. It can move on it's own!
to_chat(H, span_red("The [src] shifts about, almost as if squirming!"))
to_chat(user, span_red("You cause the [src] to shift against [H]'s form! Well, what little you can get to, given your current state!"))
else if(H.shoes == src)
@@ -124,7 +124,7 @@
else
to_chat(H, span_red("[user]'s form shifts around in the \the [src], squirming!"))
to_chat(user, span_red("You move around inside the [src], to no avail."))
else if(istype(user,/mob/living/voice)) //Possessed!
else if(isvoice(user)) //Possessed!
src.visible_message(span_red("The [src] shifts about!"))
to_chat(user, span_red("You cause the [src] to shift about!"))
else

View File

@@ -22,7 +22,7 @@
set name = "Toggle Headphone Music"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
var/base_icon = copytext(icon_state,1,(length(icon_state) - 3 + headphones_on))

View File

@@ -190,7 +190,7 @@ BLIND // can't see anything
set name = "Switch Eyepatch"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
eye = !eye
@@ -214,7 +214,7 @@ BLIND // can't see anything
set name = "Switch Eyepatch"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
eye = !eye
@@ -538,7 +538,7 @@ BLIND // can't see anything
flash_protection = FLASH_PROTECTION_REDUCED
/obj/item/clothing/glasses/thermal/emp_act(severity)
if(istype(src.loc, /mob/living/carbon/human))
if(ishuman(src.loc))
var/mob/living/carbon/human/M = src.loc
to_chat(M, span_red("The Optical Thermal Scanner overloads and blinds you!"))
if(M.glasses == src)

View File

@@ -234,7 +234,7 @@
set name = "Toggle projector"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
if(toggleable)
if(active)
@@ -280,7 +280,7 @@
set name = "Switch Eyepatch"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
eye = !eye
@@ -305,7 +305,7 @@
set name = "Switch Eyepatch"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
eye = !eye
@@ -329,7 +329,7 @@
set name = "Switch Eyepatch"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(!isliving(usr)) return
if(usr.stat) return
eye = !eye

View File

@@ -85,6 +85,6 @@
return 1
/obj/item/clothing/gloves/sterile/thieves/Touch(var/atom/A, var/proximity)
if(proximity && istype(usr, /mob/living/carbon/human) && do_after(usr, 1 SECOND, A))
if(proximity && ishuman(usr) && do_after(usr, 1 SECOND, A))
return pickpocket(usr, A, proximity)
return 0

View File

@@ -189,7 +189,7 @@ var/global/list/breach_burn_descriptors = list(
if(!repair_power)
return
if(istype(src.loc,/mob/living))
if(isliving(src.loc))
to_chat(user, span_warning("How do you intend to patch a hardsuit while someone is wearing it?"))
return
@@ -205,7 +205,7 @@ var/global/list/breach_burn_descriptors = list(
else if(W.has_tool_quality(TOOL_WELDER))
if(istype(src.loc,/mob/living))
if(isliving(src.loc))
to_chat(user, span_red("How do you intend to patch a hardsuit while someone is wearing it?"))
return

View File

@@ -73,7 +73,7 @@
// Check if there's actually an AI to deal with.
var/mob/living/silicon/ai/target_ai
if(istype(input_device, /mob/living/silicon/ai))
if(isAI(input_device))
target_ai = input_device
else
target_ai = locate(/mob/living/silicon/ai) in input_device.contents

View File

@@ -58,7 +58,7 @@
// Check if there's actually an AI to deal with.
var/mob/living/silicon/ai/target_ai
if(istype(input_device, /mob/living/silicon/ai))
if(isAI(input_device))
target_ai = input_device
else
target_ai = locate(/mob/living/silicon/ai) in input_device.contents

View File

@@ -212,7 +212,7 @@
var/mob/living/M
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
if(piece.loc != src && !(wearer && piece.loc == wearer))
if(istype(piece.loc, /mob/living))
if(isliving(piece.loc))
M = piece.loc
M.unEquip(piece)
piece.forceMove(src)

View File

@@ -64,7 +64,7 @@
// Check if this is a hardsuit upgrade or a modification.
else if(istype(W,/obj/item/rig_module))
if(istype(src.loc,/mob/living/carbon/human))
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
if(H.back == src || H.belt == src)
to_chat(user, span_danger("You can't install a hardsuit module while the suit is being worn."))
@@ -126,7 +126,7 @@
if(!to_remove)
return
if(istype(src.loc,/mob/living/carbon/human) && to_remove != "cell")
if(ishuman(src.loc) && to_remove != "cell")
var/mob/living/carbon/human/H = src.loc
if(H.back == src || H.belt == src)
to_chat(user, "You can't remove an installed device while the hardsuit is being worn.")

View File

@@ -206,7 +206,7 @@
set category = "Object"
set src in usr
if(!istype(src.loc,/mob/living)) return
if(!isliving(src.loc)) return
var/mob/living/carbon/human/H = usr
@@ -232,7 +232,7 @@
/obj/item/clothing/suit/space/void/attackby(obj/item/W as obj, mob/user as mob)
if(!istype(user,/mob/living)) return
if(!isliving(user)) return
if(istype(W,/obj/item/clothing/accessory) || istype(W, /obj/item/hand_labeler))
return ..()

View File

@@ -945,7 +945,7 @@
set name = "Roll Sleeves"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living))
if(!isliving(usr))
return
if(usr.stat)
return
@@ -964,7 +964,7 @@
set name = "Toggle Shirt Tucking"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)||usr.stat)
if(!isliving(usr)||usr.stat)
return
if(tucked == 0)
@@ -979,7 +979,7 @@
set name = "Toggle Shirt Buttons"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)||usr.stat)
if(!isliving(usr)||usr.stat)
return
if(buttoned == 0)