diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index f0bfdb62ca0..89366a6203b 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -413,13 +413,13 @@ GLOBAL_LIST_EMPTY(species_list)
message = "[source][message]"
for(var/mob/M in GLOB.player_list)
var/datum/preferences/prefs
- if(M.client && M.client.prefs)
+ if(M.client.prefs)
prefs = M.client.prefs
else
prefs = new
var/override = FALSE
- if(M.client && M.client.holder && (prefs.chat_toggles & CHAT_DEAD))
+ if(M.client.holder && (prefs.chat_toggles & CHAT_DEAD))
override = TRUE
if(HAS_TRAIT(M, TRAIT_SIXTHSENSE))
override = TRUE
diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm
index 3abe0bbe6f8..b1f4de116d2 100644
--- a/code/controllers/subsystem/blackbox.dm
+++ b/code/controllers/subsystem/blackbox.dm
@@ -41,10 +41,7 @@ SUBSYSTEM_DEF(blackbox)
if(!SSdbcore.Connect())
return
- var/playercount = 0
- for(var/mob/M in GLOB.player_list)
- if(M.client)
- playercount += 1
+ var/playercount = LAZYLEN(GLOB.player_list)
var/admincount = GLOB.admins.len
var/datum/DBQuery/query_record_playercount = SSdbcore.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time, server_ip, server_port, round_id) VALUES ([playercount], [admincount], '[SQLtime()]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', '[GLOB.round_id]')")
query_record_playercount.Execute()
diff --git a/code/controllers/subsystem/pai.dm b/code/controllers/subsystem/pai.dm
index e9c67666202..24305add63b 100644
--- a/code/controllers/subsystem/pai.dm
+++ b/code/controllers/subsystem/pai.dm
@@ -144,7 +144,7 @@ SUBSYSTEM_DEF(pai)
if(!ghost_spam)
ghost_spam = TRUE
for(var/mob/dead/observer/G in GLOB.player_list)
- if(!G.key || !G.client)
+ if(!G.key)
continue
if(!(ROLE_PAI in G.client.prefs.be_special))
continue
diff --git a/code/datums/world_topic.dm b/code/datums/world_topic.dm
index fed7545428d..9f2b0e6430a 100644
--- a/code/datums/world_topic.dm
+++ b/code/datums/world_topic.dm
@@ -104,8 +104,7 @@
var/expected_key = input[keyword]
for(var/mob/dead/observer/O in GLOB.player_list)
if(O.key == expected_key)
- if(O.client)
- new /obj/screen/splash(O.client, TRUE)
+ new /obj/screen/splash(O.client, TRUE)
break
/datum/world_topic/adminmsg
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 6ad0205c76e..e167817c823 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -61,7 +61,7 @@
var/playerC = 0
for(var/i in GLOB.new_player_list)
var/mob/dead/new_player/player = i
- if((player.client)&&(player.ready == PLAYER_READY_TO_PLAY))
+ if(player.ready == PLAYER_READY_TO_PLAY)
playerC++
if(!GLOB.Debug2)
if(playerC < required_players || (maximum_players >= 0 && playerC > maximum_players))
@@ -363,7 +363,7 @@
// Ultimate randomizing code right here
for(var/i in GLOB.new_player_list)
var/mob/dead/new_player/player = i
- if(player.client && player.ready == PLAYER_READY_TO_PLAY && player.check_preferences())
+ if(player.ready == PLAYER_READY_TO_PLAY && player.check_preferences())
players += player
// Shuffling, the players list is now ping-independent!!!
@@ -418,7 +418,7 @@
. = 0
for(var/i in GLOB.new_player_list)
var/mob/dead/new_player/P = i
- if(P.client && P.ready == PLAYER_READY_TO_PLAY)
+ if(P.ready == PLAYER_READY_TO_PLAY)
. ++
/proc/reopen_roundstart_suicide_roles()
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 1b8bf52d892..310cc882ad6 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -707,13 +707,13 @@ GLOBAL_LIST_EMPTY(possible_items_special)
var/n_p = 1 //autowin
var/list/datum/mind/owners = get_owners()
if (SSticker.current_state == GAME_STATE_SETTING_UP)
- for(var/i in GLOB.new_player_list)
- var/mob/dead/new_player/P = i
- if(P.client && P.ready == PLAYER_READY_TO_PLAY && !(P.mind in owners))
+ for(var/i in GLOB.new_player_list)
+ var/mob/dead/new_player/P = i
+ if(P.ready == PLAYER_READY_TO_PLAY && !(P.mind in owners))
n_p ++
else if (SSticker.IsRoundInProgress())
for(var/mob/living/carbon/human/P in GLOB.player_list)
- if(P.client && !(P.mind.has_antag_datum(/datum/antagonist/changeling)) && !(P.mind in owners))
+ if(!(P.mind.has_antag_datum(/datum/antagonist/changeling)) && !(P.mind in owners))
n_p ++
target_amount = min(target_amount, n_p)
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 93d17b513aa..5d8a494de27 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -291,7 +291,7 @@
else
to_chat(AI, "[U] holds \a [itemname] up to one of your cameras ...")
AI.last_paper_seen = "
[itemname][info]"
- else if (O.client && O.client.eye == src)
+ else if (O.client.eye == src)
to_chat(O, "[U] holds \a [itemname] up to one of the cameras ...")
O << browse(text("[][]", itemname, info), text("window=[]", itemname))
return
@@ -390,7 +390,7 @@
//Apparently, this will disconnect anyone even if the camera was re-activated.
//I guess that doesn't matter since they can't use it anyway?
for(var/mob/O in GLOB.player_list)
- if (O.client && O.client.eye == src)
+ if (O.client.eye == src)
O.unset_machine()
O.reset_perspective(null)
to_chat(O, "The screen bursts into static.")
diff --git a/code/game/machinery/telecomms/broadcasting.dm b/code/game/machinery/telecomms/broadcasting.dm
index 59cd627c9d4..7a977174b0a 100644
--- a/code/game/machinery/telecomms/broadcasting.dm
+++ b/code/game/machinery/telecomms/broadcasting.dm
@@ -176,7 +176,7 @@
// Add observers who have ghost radio enabled.
for(var/mob/dead/observer/M in GLOB.player_list)
- if(M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTRADIO))
+ if(M.client.prefs.chat_toggles & CHAT_GHOSTRADIO)
receive |= M
// Render the message and have everybody hear it.
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 8fea890975c..416c8040d2b 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -651,7 +651,7 @@ GLOBAL_LIST_EMPTY(PDAs)
// Show it to ghosts
var/ghost_message = "[owner] PDA Message --> [target_text]: [signal.format_message()]"
for(var/mob/M in GLOB.player_list)
- if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
+ if(isobserver(M) && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
to_chat(M, "[FOLLOW_LINK(M, user)] [ghost_message]")
// Log in the talk log
user.log_talk(message, LOG_PDA, tag="PDA: [initial(name)] to [target_text]")
diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm
index 39e5c0c859c..7581a00f567 100644
--- a/code/game/objects/items/weaponry.dm
+++ b/code/game/objects/items/weaponry.dm
@@ -140,7 +140,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
var/closest_victim
var/closest_distance = 255
for(var/mob/living/carbon/human/H in GLOB.player_list - user)
- if(H.client && H.mind.special_role == "highlander" && (!closest_victim || get_dist(user, closest_victim) < closest_distance))
+ if(H.mind.special_role == "highlander" && (!closest_victim || get_dist(user, closest_victim) < closest_distance))
closest_victim = H
if(!closest_victim)
to_chat(user, "[src] thrums for a moment and falls dark. Perhaps there's nobody nearby.")
diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm
index ae844998a29..37874a7f3b7 100644
--- a/code/modules/admin/secrets.dm
+++ b/code/modules/admin/secrets.dm
@@ -350,7 +350,7 @@
for(var/mob/living/H in GLOB.player_list)
if(!(ishuman(H)||istype(H, /mob/living/silicon/)))
continue
- if(H.stat == DEAD || !H.client || !H.mind || ispAI(H))
+ if(H.stat == DEAD || !H.mind || ispAI(H))
continue
if(is_special_character(H))
continue
diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm
index f0be90b2809..9b609bab9f1 100644
--- a/code/modules/admin/verbs/deadsay.dm
+++ b/code/modules/admin/verbs/deadsay.dm
@@ -29,7 +29,7 @@
for (var/mob/M in GLOB.player_list)
if(isnewplayer(M))
continue
- if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
+ if (M.stat == DEAD || (M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
to_chat(M, rendered)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/verbs/onlyone.dm b/code/modules/admin/verbs/onlyone.dm
index 05f56047cb8..87fd8e669b1 100644
--- a/code/modules/admin/verbs/onlyone.dm
+++ b/code/modules/admin/verbs/onlyone.dm
@@ -13,7 +13,7 @@ GLOBAL_VAR_INIT(highlander, FALSE)
component.relocate() //Gets it out of bags and such
for(var/mob/living/carbon/human/H in GLOB.player_list)
- if(H.stat == DEAD || !(H.client))
+ if(H.stat == DEAD)
continue
H.make_scottish()
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index e582284929c..a73b63bf547 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -155,9 +155,8 @@
log_admin("[key_name(src)] stopped all currently playing sounds.")
message_admins("[key_name_admin(src)] stopped all currently playing sounds.")
for(var/mob/M in GLOB.player_list)
- if(M.client)
- SEND_SOUND(M, sound(null))
- var/client/C = M.client
- if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded)
- C.chatOutput.stopMusic()
+ SEND_SOUND(M, sound(null))
+ var/client/C = M.client
+ if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded)
+ C.chatOutput.stopMusic()
SSblackbox.record_feedback("tally", "admin_verb", 1, "Stop All Playing Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/events/holiday/vday.dm b/code/modules/events/holiday/vday.dm
index bc05cd68132..2cf0b796454 100644
--- a/code/modules/events/holiday/vday.dm
+++ b/code/modules/events/holiday/vday.dm
@@ -23,7 +23,7 @@
var/list/valentines = list()
for(var/mob/living/M in GLOB.player_list)
- if(!M.stat && M.client && M.mind)
+ if(!M.stat && M.mind)
valentines |= M
diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
index 3c4699746d5..af9a3ed062d 100644
--- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
+++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
@@ -119,9 +119,8 @@ Des: Adds the infection image to all aliens for this embryo
----------------------------------------*/
/obj/item/organ/body_egg/alien_embryo/AddInfectionImages()
for(var/mob/living/carbon/alien/alien in GLOB.player_list)
- if(alien.client)
- var/I = image('icons/mob/alien.dmi', loc = owner, icon_state = "infected[stage]")
- alien.client.images += I
+ var/I = image('icons/mob/alien.dmi', loc = owner, icon_state = "infected[stage]")
+ alien.client.images += I
/*----------------------------------------
Proc: RemoveInfectionImage(C)
@@ -129,7 +128,6 @@ Des: Removes all images from the mob infected by this embryo
----------------------------------------*/
/obj/item/organ/body_egg/alien_embryo/RemoveInfectionImages()
for(var/mob/living/carbon/alien/alien in GLOB.player_list)
- if(alien.client)
- for(var/image/I in alien.client.images)
- if(dd_hasprefix_case(I.icon_state, "infected") && I.loc == owner)
- qdel(I)
+ for(var/image/I in alien.client.images)
+ if(dd_hasprefix_case(I.icon_state, "infected") && I.loc == owner)
+ qdel(I)
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index 066a1a96a5e..2b06d9d870f 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -258,7 +258,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
var/mob/M = _M
if(M.stat != DEAD) //not dead, not important
continue
- if(!M.client || !client) //client is so that ghosts don't have to listen to mice
+ if(!client) //client is so that ghosts don't have to listen to mice
continue
if(get_dist(M, src) > 7 || M.z != z) //they're out of range of normal hearing
if(eavesdropping_modes[message_mode] && !(M.client.prefs.chat_toggles & CHAT_GHOSTWHISPER)) //they're whispering and we have hearing whispers at any range off
diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm
index 162ddc1745c..2de1149c6e3 100644
--- a/code/modules/mob/living/silicon/ai/say.dm
+++ b/code/modules/mob/living/silicon/ai/say.dm
@@ -150,7 +150,7 @@
if(!only_listener)
// Play voice for all mobs in the z level
for(var/mob/M in GLOB.player_list)
- if(M.client && M.can_hear() && (M.client.prefs.toggles & SOUND_ANNOUNCEMENTS))
+ if(M.can_hear() && (M.client.prefs.toggles & SOUND_ANNOUNCEMENTS))
var/turf/T = get_turf(M)
if(T.z == z_level)
SEND_SOUND(M, voice)
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 84b09d59ee2..9028bed65fb 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -408,34 +408,33 @@
if(ignore_mapload && SSatoms.initialized != INITIALIZATION_INNEW_REGULAR) //don't notify for objects created during a map load
return
for(var/mob/dead/observer/O in GLOB.player_list)
- if(O.client)
- if(!notify_suiciders && (O in GLOB.suicided_mob_list))
- continue
- if (ignore_key && O.ckey in GLOB.poll_ignore[ignore_key])
- continue
- var/orbit_link
- if (source && action == NOTIFY_ORBIT)
- orbit_link = " (Orbit)"
- to_chat(O, "[message][(enter_link) ? " [enter_link]" : ""][orbit_link]")
- if(ghost_sound)
- SEND_SOUND(O, sound(ghost_sound, volume = notify_volume))
- if(flashwindow)
- window_flash(O.client)
- if(source)
- var/obj/screen/alert/notify_action/A = O.throw_alert("[REF(source)]_notify_action", /obj/screen/alert/notify_action)
- if(A)
- if(O.client.prefs && O.client.prefs.UI_style)
- A.icon = ui_style2icon(O.client.prefs.UI_style)
- if (header)
- A.name = header
- A.desc = message
- A.action = action
- A.target = source
- if(!alert_overlay)
- alert_overlay = new(source)
- alert_overlay.layer = FLOAT_LAYER
- alert_overlay.plane = FLOAT_PLANE
- A.add_overlay(alert_overlay)
+ if(!notify_suiciders && (O in GLOB.suicided_mob_list))
+ continue
+ if (ignore_key && O.ckey in GLOB.poll_ignore[ignore_key])
+ continue
+ var/orbit_link
+ if (source && action == NOTIFY_ORBIT)
+ orbit_link = " (Orbit)"
+ to_chat(O, "[message][(enter_link) ? " [enter_link]" : ""][orbit_link]")
+ if(ghost_sound)
+ SEND_SOUND(O, sound(ghost_sound, volume = notify_volume))
+ if(flashwindow)
+ window_flash(O.client)
+ if(source)
+ var/obj/screen/alert/notify_action/A = O.throw_alert("[REF(source)]_notify_action", /obj/screen/alert/notify_action)
+ if(A)
+ if(O.client.prefs && O.client.prefs.UI_style)
+ A.icon = ui_style2icon(O.client.prefs.UI_style)
+ if (header)
+ A.name = header
+ A.desc = message
+ A.action = action
+ A.target = source
+ if(!alert_overlay)
+ alert_overlay = new(source)
+ alert_overlay.layer = FLOAT_LAYER
+ alert_overlay.plane = FLOAT_PLANE
+ A.add_overlay(alert_overlay)
/**
* Heal a robotic body part on a mob
diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm
index 4c11cdd9d9e..19d70f87232 100644
--- a/code/modules/power/singularity/narsie.dm
+++ b/code/modules/power/singularity/narsie.dm
@@ -171,8 +171,6 @@
//no living humans, follow a ghost instead.
for(var/mob/dead/observer/ghost in GLOB.player_list)
- if(!ghost.client)
- continue
var/turf/pos = get_turf(ghost)
if(!pos || (pos.z != z))
continue