mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 20:23:26 +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
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
Reference in New Issue
Block a user