[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

@@ -43,7 +43,7 @@
var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Edit Appearance", human_mob_list)
if(!istype(M, /mob/living/carbon/human))
if(!ishuman(M))
to_chat(usr, span_warning("You can only do this to humans!"))
return
if(tgui_alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No")) != "Yes")

View File

@@ -100,7 +100,7 @@
if(!ticker)
tgui_alert_async(usr, "Wait until the game starts")
return
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
log_admin("[key_name(src)] has robotized [M.key].")
spawn(10)
M:Robotize()
@@ -120,7 +120,7 @@
tgui_alert_async(usr, "That mob doesn't seem to exist, close the panel and try again.")
return
if(istype(M, /mob/new_player))
if(isnewplayer(M))
tgui_alert_async(usr, "The mob must not be a new_player.")
return
@@ -279,7 +279,7 @@
if (!ticker)
tgui_alert_async(usr, "Wait until the game starts")
return
if (istype(M, /mob/living/carbon/human))
if (ishuman(M))
var/mob/living/carbon/human/H = M
if (H.wear_id)
var/obj/item/card/id/id = H.wear_id

View File

@@ -43,7 +43,7 @@
to_chat(usr, span_notice("Ghosts shouldn't be narrated! If you want a ghost, make it a subtype of mob/living!"))
return
//We require a static mob/living type to check for .client and also later on, to use the unique .say mechanics for stuttering and language
if(istype(E, /mob/living))
if(isliving(E))
var/mob/living/L = E
if(L.client)
to_chat(usr, span_notice("[L.name] is a player. All attempts to speak through them \
@@ -170,7 +170,7 @@
to_chat(usr, span_notice("[name] has invalid reference, deleting"))
holder.entity_names -= name
holder.entity_refs -= name
if(istype(selection, /mob/living))
if(isliving(selection))
var/mob/living/our_entity = selection
if(our_entity.client) //Making sure we can't speak for players
log_and_message_admins("used entity-narrate to speak through [our_entity.ckey]'s mob", usr)
@@ -267,7 +267,7 @@
tgui_selected_type = ""
tgui_selected_name = ""
tgui_selected_refs = null
if(istype(tgui_selected_refs, /mob/living))
if(isliving(tgui_selected_refs))
var/mob/living/L = tgui_selected_refs
if(L.client)
tgui_selected_type = "!!!!PLAYER!!!!"
@@ -296,7 +296,7 @@
entity_refs -= entity
tgui_selected_id_multi -= entity
continue
if(istype(ref, /mob/living))
if(isliving(ref))
var/mob/living/L = ref
if(L.client)
log_and_message_admins("used entity-narrate to speak through [L.ckey]'s mob", ui.user)
@@ -316,7 +316,7 @@
tgui_selected_name = ""
tgui_selected_refs = null
return
if(istype(ref, /mob/living))
if(isliving(ref))
var/mob/living/L = ref
if(L.client)
log_and_message_admins("used entity-narrate to speak through [L.ckey]'s mob", ui.user)

View File

@@ -18,7 +18,7 @@
//Initializing our working list
for(var/player in player_list_local)
if(!istype(player, /mob/living)) continue //We only care for living players
if(!isliving(player)) continue //We only care for living players
var/mob/living/L = player
players += 1
if(L.client.inactivity > INACTIVITY_CAP)

View File

@@ -24,7 +24,7 @@
return
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
if(isAI(M))
tgui_alert_async(usr, "The AI can't be sent to prison you jerk!")
return
//strip their stuff before they teleport into a cell :downs:
@@ -34,7 +34,7 @@
M.Paralyse(5)
sleep(5) //so they black out before warping
M.loc = pick(prisonwarp)
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
var/mob/living/carbon/human/prisoner = M
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/prison(prisoner), slot_w_uniform)
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes)
@@ -764,7 +764,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1)
if(istype(M, /mob/observer/dead))
if(isobserver(M))
gibs(M.loc)
return
@@ -782,7 +782,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!confirm)
return
if(confirm == "Yes")
if (istype(mob, /mob/observer/dead)) // so they don't spam gibs everywhere
if (isobserver(mob)) // so they don't spam gibs everywhere
return
else
mob.gib()