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
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user