diff --git a/GainStation13/code/mechanics/fatness.dm b/GainStation13/code/mechanics/fatness.dm
index 370055a7..20d18373 100644
--- a/GainStation13/code/mechanics/fatness.dm
+++ b/GainStation13/code/mechanics/fatness.dm
@@ -28,8 +28,8 @@
fatness += amount_to_change
fatness = max(fatness, MINIMUM_FATNESS_LEVEL) //It would be a little silly if someone got negative fat.
- if(client.prefs.max_weight)
- fatness = min(fatness, (client.prefs.max_weight - 1))
+ if(client?.prefs?.max_weight)
+ fatness = min(fatness, (client?.prefs?.max_weight - 1))
return TRUE
@@ -48,27 +48,27 @@
switch(type_of_fattening)
if(FATTENING_TYPE_ITEM)
- if(!client.prefs.weight_gain_items)
+ if(!client?.prefs?.weight_gain_items)
return FALSE
if(FATTENING_TYPE_FOOD)
- if(!client.prefs.weight_gain_food)
+ if(!client?.prefs?.weight_gain_food)
return FALSE
if(FATTENING_TYPE_CHEM)
- if(!client.prefs.weight_gain_chems)
+ if(!client?.prefs?.weight_gain_chems)
return FALSE
if(FATTENING_TYPE_WEAPON)
- if(!client.prefs.weight_gain_weapons)
+ if(!client?.prefs?.weight_gain_weapons)
return FALSE
if(FATTENING_TYPE_MAGIC)
- if(!client.prefs.weight_gain_magic)
+ if(!client?.prefs?.weight_gain_magic)
return FALSE
if(FATTENING_TYPE_VIRUS)
- if(!client.prefs.weight_gain_viruses)
+ if(!client?.prefs?.weight_gain_viruses)
return FALSE
if(FATTENING_TYPE_WEIGHT_LOSS)
diff --git a/GainStation13/code/mobs/chocoslime.dm b/GainStation13/code/mobs/chocoslime.dm
index 7236d0dc..39bd1663 100644
--- a/GainStation13/code/mobs/chocoslime.dm
+++ b/GainStation13/code/mobs/chocoslime.dm
@@ -5,7 +5,7 @@
/mob/living/simple_animal/hostile/feed/AttackingTarget()
. = ..()
var/mob/living/carbon/L = target
- if(L.client.prefs.weight_gain_weapons)
+ if(L.client?.prefs?.weight_gain_weapons)
if(L.reagents)
if(!L.is_mouth_covered(head_only = 1))
L.reagents.add_reagent(food_fed, food_per_feeding)
diff --git a/GainStation13/code/modules/mob/living/emote.dm b/GainStation13/code/modules/mob/living/emote.dm
index d29e92ee..899d964a 100644
--- a/GainStation13/code/modules/mob/living/emote.dm
+++ b/GainStation13/code/modules/mob/living/emote.dm
@@ -5,7 +5,7 @@
var/turf/source = get_turf(user)
var/sound/noise = sound(gs13_get_sfx(noise_name))
for(var/mob/living/M in get_hearers_in_view(3, source))
- if ((pref_toggle == 0) || (M.client && M.client.prefs.cit_toggles & pref_toggle))
+ if ((pref_toggle == 0) || (M.client && M.client?.prefs?.cit_toggles & pref_toggle))
M.playsound_local(source, noise_name, 50, 1, S = noise)
/datum/emote/living/proc/reduce_fullness(var/mob/living/user, fullness_amount) // fullness_amount should be between 5 and 20 for balance and below 80 for functionality
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 0d64297b..55b24bf2 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -456,7 +456,7 @@
if(!M.key || !M.client || (ignore_category && GLOB.poll_ignore[ignore_category] && (M.ckey in GLOB.poll_ignore[ignore_category])))
continue
if(be_special_flag)
- if(!(M.client.prefs) || !(be_special_flag in M.client.prefs.be_special))
+ if(!(M.client.prefs) || !(be_special_flag in M.client?.prefs?.be_special))
continue
if(gametypeCheck)
if(!gametypeCheck.age_check(M.client))
@@ -504,7 +504,7 @@
var/mob/living/carbon/human/new_character = new//The mob being spawned.
SSjob.SendToLateJoin(new_character)
- G_found.client.prefs.copy_to(new_character)
+ G_found.client?.prefs?.copy_to(new_character)
new_character.dna.update_dna_identity()
G_found.transfer_ckey(new_character, FALSE)
@@ -538,8 +538,8 @@
return
var/displayed_rank = rank
- if(character.client && character.client.prefs && character.client.prefs.alt_titles_preferences[rank])
- displayed_rank = character.client.prefs.alt_titles_preferences[rank]
+ if(character.client && character.client.prefs && character.client?.prefs?.alt_titles_preferences[rank])
+ displayed_rank = character.client?.prefs?.alt_titles_preferences[rank]
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
announcer.announce("ARRIVAL", character.real_name, rank, displayed_rank, list()) //make the list empty to make it announce it in common
diff --git a/code/__HELPERS/priority_announce.dm b/code/__HELPERS/priority_announce.dm
index fa37e9ee..685bf1fb 100644
--- a/code/__HELPERS/priority_announce.dm
+++ b/code/__HELPERS/priority_announce.dm
@@ -33,7 +33,7 @@
for(var/mob/M in GLOB.player_list)
if(!isnewplayer(M) && M.can_hear())
to_chat(M, announcement)
- if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
+ if(M.client?.prefs?.toggles & SOUND_ANNOUNCEMENTS)
SEND_SOUND(M, s)
/proc/print_command_report(text = "", title = null, announce=TRUE)
@@ -56,7 +56,7 @@
for(var/mob/M in GLOB.player_list)
if(!isnewplayer(M) && M.can_hear())
to_chat(M, "[html_encode(title)]
[html_encode(message)]
")
- if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
+ if(M.client?.prefs?.toggles & SOUND_ANNOUNCEMENTS)
if(alert)
SEND_SOUND(M, sound('sound/misc/notice1.ogg'))
else
diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm
index 858b8dbd..630b5315 100644
--- a/code/_onclick/hud/action_button.dm
+++ b/code/_onclick/hud/action_button.dm
@@ -54,7 +54,7 @@
locked = !locked
to_chat(usr, "Action button \"[name]\" [locked ? "" : "un"]locked.")
if(id && usr.client) //try to (un)remember position
- usr.client.prefs.action_buttons_screen_locs["[name]_[id]"] = locked ? moved : null
+ usr.client?.prefs?.action_buttons_screen_locs["[name]_[id]"] = locked ? moved : null
return TRUE
if(usr.next_click > world.time)
return
@@ -89,7 +89,7 @@
locked = !locked
to_chat(usr, "Action button \"[name]\" [locked ? "" : "un"]locked.")
if(id && usr.client) //try to (un)remember position
- usr.client.prefs.action_buttons_screen_locs["[name]_[id]"] = locked ? moved : null
+ usr.client?.prefs?.action_buttons_screen_locs["[name]_[id]"] = locked ? moved : null
return TRUE
if(modifiers["alt"])
for(var/V in usr.actions)
@@ -97,12 +97,12 @@
var/obj/screen/movable/action_button/B = A.button
B.moved = FALSE
if(B.id && usr.client)
- usr.client.prefs.action_buttons_screen_locs["[B.name]_[B.id]"] = null
- B.locked = usr.client.prefs.buttons_locked
- locked = usr.client.prefs.buttons_locked
+ usr.client?.prefs?.action_buttons_screen_locs["[B.name]_[B.id]"] = null
+ B.locked = usr.client?.prefs?.buttons_locked
+ locked = usr.client?.prefs?.buttons_locked
moved = FALSE
if(id && usr.client)
- usr.client.prefs.action_buttons_screen_locs["[name]_[id]"] = null
+ usr.client?.prefs?.action_buttons_screen_locs["[name]_[id]"] = null
usr.update_action_buttons(TRUE)
to_chat(usr, "Action button positions have been reset.")
return TRUE
diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm
index 549b6346..60a99fe9 100644
--- a/code/_onclick/hud/ghost.dm
+++ b/code/_onclick/hud/ghost.dm
@@ -89,7 +89,7 @@
if(!.)
return
var/mob/screenmob = viewmob || mymob
- if(!screenmob.client.prefs.ghost_hud)
+ if(!screenmob.client?.prefs?.ghost_hud)
screenmob.client.screen -= static_inventory
else
screenmob.client.screen += static_inventory
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index 5f233437..683d65c2 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -70,12 +70,12 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
if (!ui_style)
// will fall back to the default if any of these are null
- ui_style = ui_style2icon(owner.client && owner.client.prefs && owner.client.prefs.UI_style)
+ ui_style = ui_style2icon(owner.client && owner.client.prefs && owner.client?.prefs?.UI_style)
hide_actions_toggle = new
hide_actions_toggle.InitialiseIcon(src)
if(mymob.client)
- hide_actions_toggle.locked = mymob.client.prefs.buttons_locked
+ hide_actions_toggle.locked = mymob.client?.prefs?.buttons_locked
hand_slots = list()
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index e54ede38..7417d1d5 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -85,7 +85,7 @@
owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness)
var/widescreenlayout = FALSE //CIT CHANGE - adds support for different hud layouts depending on widescreen pref
- if(owner.client && owner.client.prefs && owner.client.prefs.widescreenpref) //CIT CHANGE - ditto
+ if(owner.client && owner.client.prefs && owner.client?.prefs?.widescreenpref) //CIT CHANGE - ditto
widescreenlayout = FALSE // CIT CHANGE - ditto
var/obj/screen/using
diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm
index ac749409..d51cd24d 100644
--- a/code/_onclick/hud/plane_master.dm
+++ b/code/_onclick/hud/plane_master.dm
@@ -51,7 +51,7 @@
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/game_world/backdrop(mob/mymob)
- if(istype(mymob) && mymob.client && mymob.client.prefs && mymob.client.prefs.ambientocclusion)
+ if(istype(mymob) && mymob.client && mymob.client.prefs && mymob.client?.prefs?.ambientocclusion)
add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION)
else
remove_filter("ambient_occlusion")
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 00f84851..f190704f 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -247,7 +247,7 @@
usr.a_intent_change(INTENT_HOTKEY_RIGHT)
/obj/screen/act_intent/segmented/Click(location, control, params)
- if(usr.client.prefs.toggles & INTENT_STYLE)
+ if(usr.client?.prefs?.toggles & INTENT_STYLE)
var/_x = text2num(params2list(params)["icon-x"])
var/_y = text2num(params2list(params)["icon-y"])
diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm
index f76a745f..2ef9c152 100644
--- a/code/_onclick/observer.dm
+++ b/code/_onclick/observer.dm
@@ -50,7 +50,7 @@
if(user.client)
if(IsAdminGhost(user))
attack_ai(user)
- else if(user.client.prefs.inquisitive_ghost)
+ else if(user.client?.prefs?.inquisitive_ghost)
user.examinate(src)
return FALSE
diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm
index 6aea7611..99aca6f1 100644
--- a/code/controllers/subsystem/job.dm
+++ b/code/controllers/subsystem/job.dm
@@ -111,13 +111,13 @@ SUBSYSTEM_DEF(job)
if(job.required_playtime_remaining(player.client))
JobDebug("FOC player not enough xp, Player: [player]")
continue
- if(flag && (!(flag in player.client.prefs.be_special)))
+ if(flag && (!(flag in player.client?.prefs?.be_special)))
JobDebug("FOC flag failed, Player: [player], Flag: [flag], ")
continue
if(player.mind && job.title in player.mind.restricted_roles)
JobDebug("FOC incompatible with antagonist role, Player: [player]")
continue
- if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
+ if(player.client?.prefs?.GetJobDepartment(job, level) & job.flag)
JobDebug("FOC pass, Player: [player], Level:[level]")
candidates += player
return candidates
@@ -333,7 +333,7 @@ SUBSYSTEM_DEF(job)
continue
// If the player wants that job on this level, then try give it to him.
- if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
+ if(player.client?.prefs?.GetJobDepartment(job, level) & job.flag)
// If the job isn't filled
if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1)
JobDebug("DO pass, Player: [player], Level:[level], Job:[job.title]")
@@ -360,17 +360,17 @@ SUBSYSTEM_DEF(job)
/datum/controller/subsystem/job/proc/HandleUnassigned(mob/dead/new_player/player)
if(PopcapReached())
RejectPlayer(player)
- else if(player.client.prefs.joblessrole == BEOVERFLOW)
+ else if(player.client?.prefs?.joblessrole == BEOVERFLOW)
var/allowed_to_be_a_loser = !jobban_isbanned(player, SSjob.overflow_role)
if(QDELETED(player) || !allowed_to_be_a_loser)
RejectPlayer(player)
else
if(!AssignRole(player, SSjob.overflow_role))
RejectPlayer(player)
- else if(player.client.prefs.joblessrole == BERANDOMJOB)
+ else if(player.client?.prefs?.joblessrole == BERANDOMJOB)
if(!GiveRandomJob(player))
RejectPlayer(player)
- else if(player.client.prefs.joblessrole == RETURNTOLOBBY)
+ else if(player.client?.prefs?.joblessrole == RETURNTOLOBBY)
RejectPlayer(player)
else //Something gone wrong if we got here.
var/message = "DO: [player] fell through handling unassigned"
@@ -441,8 +441,8 @@ SUBSYSTEM_DEF(job)
//Flavortext
var/display_rank = rank
- if(M.client && M.client.prefs && M.client.prefs.alt_titles_preferences[rank])
- display_rank = M.client.prefs.alt_titles_preferences[rank]
+ if(M.client && M.client.prefs && M.client?.prefs?.alt_titles_preferences[rank])
+ display_rank = M.client?.prefs?.alt_titles_preferences[rank]
to_chat(M, "You are the [display_rank].")
@@ -522,11 +522,11 @@ SUBSYSTEM_DEF(job)
if(job.required_playtime_remaining(player.client))
young++
continue
- if(player.client.prefs.GetJobDepartment(job, 1) & job.flag)
+ if(player.client?.prefs?.GetJobDepartment(job, 1) & job.flag)
high++
- else if(player.client.prefs.GetJobDepartment(job, 2) & job.flag)
+ else if(player.client?.prefs?.GetJobDepartment(job, 2) & job.flag)
medium++
- else if(player.client.prefs.GetJobDepartment(job, 3) & job.flag)
+ else if(player.client?.prefs?.GetJobDepartment(job, 3) & job.flag)
low++
else never++ //not selected
SSblackbox.record_feedback("nested tally", "job_preferences", high, list("[job.title]", "high"))
diff --git a/code/controllers/subsystem/jukeboxes.dm b/code/controllers/subsystem/jukeboxes.dm
index 751dc801..482d57b1 100644
--- a/code/controllers/subsystem/jukeboxes.dm
+++ b/code/controllers/subsystem/jukeboxes.dm
@@ -37,7 +37,7 @@ SUBSYSTEM_DEF(jukeboxes)
for(var/mob/M in GLOB.player_list)
if(!M.client)
continue
- if(!(M.client.prefs.toggles & SOUND_INSTRUMENTS))
+ if(!(M.client?.prefs?.toggles & SOUND_INSTRUMENTS))
continue
M.playsound_local(M, null, 100, channel = youvegotafreejukebox[2], S = song_to_init)
@@ -105,7 +105,7 @@ SUBSYSTEM_DEF(jukeboxes)
for(var/mob/M in GLOB.player_list)
if(!M.client)
continue
- if(!(M.client.prefs.toggles & SOUND_INSTRUMENTS) || !M.can_hear())
+ if(!(M.client?.prefs?.toggles & SOUND_INSTRUMENTS) || !M.can_hear())
M.stop_sound_channel(jukeinfo[2])
continue
diff --git a/code/controllers/subsystem/pai.dm b/code/controllers/subsystem/pai.dm
index 0af3454e..e551e57e 100644
--- a/code/controllers/subsystem/pai.dm
+++ b/code/controllers/subsystem/pai.dm
@@ -146,7 +146,7 @@ SUBSYSTEM_DEF(pai)
for(var/mob/dead/observer/G in GLOB.player_list)
if(!G.key || !G.client)
continue
- if(!(ROLE_PAI in G.client.prefs.be_special))
+ if(!(ROLE_PAI in G.client?.prefs?.be_special))
continue
to_chat(G, "[user] is requesting a pAI personality! Use the pAI button to submit yourself as one.")
addtimer(CALLBACK(src, .proc/spam_again), spam_delay)
diff --git a/code/datums/action.dm b/code/datums/action.dm
index 66e837c7..b091b331 100644
--- a/code/datums/action.dm
+++ b/code/datums/action.dm
@@ -66,8 +66,8 @@
M.actions += src
if(M.client)
M.client.screen += button
- button.locked = M.client.prefs.buttons_locked || button.id ? M.client.prefs.action_buttons_screen_locs["[name]_[button.id]"] : FALSE //even if it's not defaultly locked we should remember we locked it before
- button.moved = button.id ? M.client.prefs.action_buttons_screen_locs["[name]_[button.id]"] : FALSE
+ button.locked = M.client?.prefs?.buttons_locked || button.id ? M.client?.prefs?.action_buttons_screen_locs["[name]_[button.id]"] : FALSE //even if it's not defaultly locked we should remember we locked it before
+ button.moved = button.id ? M.client?.prefs?.action_buttons_screen_locs["[name]_[button.id]"] : FALSE
M.update_action_buttons()
else
Remove(owner)
diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm
index 65767a3d..bfa83875 100644
--- a/code/datums/brain_damage/imaginary_friend.dm
+++ b/code/datums/brain_damage/imaginary_friend.dm
@@ -143,7 +143,7 @@
return
if (src.client)
- if(client.prefs.muted & MUTE_IC)
+ if(client?.prefs?.muted & MUTE_IC)
to_chat(src, "You cannot send IC messages (muted).")
return
if (!(ignore_spam || forced) && src.client.handle_spam_prevention(message,MUTE_IC))
@@ -152,7 +152,7 @@
friend_talk(message)
/mob/camera/imaginary_friend/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
- if (client?.prefs.chat_on_map && (client.prefs.see_chat_non_mob || ismob(speaker)))
+ if (client?.prefs.chat_on_map && (client?.prefs?.see_chat_non_mob || ismob(speaker)))
create_chat_message(speaker, message_language, raw_message, spans, message_mode)
to_chat(src, compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode, FALSE, source))
diff --git a/code/datums/elements/flavor_text.dm b/code/datums/elements/flavor_text.dm
index 1e0f6325..87dd0427 100644
--- a/code/datums/elements/flavor_text.dm
+++ b/code/datums/elements/flavor_text.dm
@@ -87,9 +87,9 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
examineTabOutput += "[L.name] "
examineTabOutput += "([L.dna.custom_species ? L.dna.custom_species : L.dna.species.name])"
-/* if(L.client.prefs.pins) //character has pins
+/* if(L.client?.prefs?.pins) //character has pins
var/P = ""
- for(P in L.client.prefs.pins)
+ for(P in L.client?.prefs?.pins)
examineTabOutput += "[icon2html('hyperstation/icons/chat/pins.dmi', world, P)]" //show pins!
*/
examineTabOutput += ""
diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm
index fe3456f2..658a9244 100644
--- a/code/datums/emotes.dm
+++ b/code/datums/emotes.dm
@@ -64,7 +64,7 @@
if(!M.client || isnewplayer(M))
continue
var/T = get_turf(user)
- if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T, null)) && (user.client)) //SKYRAT CHANGE - only user controlled mobs show their emotes to all-seeing ghosts, to reduce chat spam
+ if(M.stat == DEAD && M.client && (M.client?.prefs?.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T, null)) && (user.client)) //SKYRAT CHANGE - only user controlled mobs show their emotes to all-seeing ghosts, to reduce chat spam
M.show_message(msg)
if(emote_type == EMOTE_AUDIBLE)
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 5a8222d6..3707e2ac 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -138,7 +138,7 @@
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
var/mob/living/L = new_character
if(L.client && L.client.prefs)
- L.canbearoused = L.client.prefs.arousable //Technically this should make taking over a character mean the body gain the new minds setting...
+ L.canbearoused = L.client?.prefs?.arousable //Technically this should make taking over a character mean the body gain the new minds setting...
L.update_arousal_hud() //Removes the old icon
hide_ckey = current.client?.prefs?.hide_ckey
@@ -290,7 +290,7 @@
var/obj/item/uplink_loc
if(traitor_mob.client && traitor_mob.client.prefs)
- switch(traitor_mob.client.prefs.uplink_spawn_loc)
+ switch(traitor_mob.client?.prefs?.uplink_spawn_loc)
if(UPLINK_PDA)
uplink_loc = PDA
if(!uplink_loc)
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 1a61d189..6c946e0e 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -454,11 +454,11 @@ GLOBAL_LIST_EMPTY(teleportlocs)
return
// Ambience goes down here -- make sure to list each area separately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
- if(L.client && !L.client.ambience_playing && L.client.prefs.toggles & SOUND_SHIP_AMBIENCE)
+ if(L.client && !L.client.ambience_playing && L.client?.prefs?.toggles & SOUND_SHIP_AMBIENCE)
L.client.ambience_playing = 1
SEND_SOUND(L, sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_BUZZ))
- if(!(L.client && (L.client.prefs.toggles & SOUND_AMBIENCE)))
+ if(!(L.client && (L.client?.prefs?.toggles & SOUND_AMBIENCE)))
return //General ambience check is below the ship ambience so one can play without the other
if(prob(35))
diff --git a/code/game/gamemodes/bloodsucker/bloodsucker.dm b/code/game/gamemodes/bloodsucker/bloodsucker.dm
index 20631917..bcc45fec 100644
--- a/code/game/gamemodes/bloodsucker/bloodsucker.dm
+++ b/code/game/gamemodes/bloodsucker/bloodsucker.dm
@@ -202,7 +202,7 @@
// Convert to HUMAN (along with ID and PDA)
if (!am_valid)
H.set_species(/datum/species/human)
- H.real_name = H.client.prefs.custom_names["human"]
+ H.real_name = H.client?.prefs?.custom_names["human"]
var/obj/item/card/id/ID = H.wear_id?.GetID()
if(ID)
ID.registered_name = H.real_name
diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm
index 5a3d6268..c151abe2 100644
--- a/code/game/gamemodes/changeling/changeling.dm
+++ b/code/game/gamemodes/changeling/changeling.dm
@@ -69,7 +69,7 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th
if(changelings.len >= changelingcap) //Caps number of latejoin antagonists
return
if(changelings.len <= (changelingcap - 2) || prob(100 - (csc * 2)))
- if(ROLE_CHANGELING in character.client.prefs.be_special)
+ if(ROLE_CHANGELING in character.client?.prefs?.be_special)
if(!jobban_isbanned(character, ROLE_CHANGELING) && !QDELETED(character) && !jobban_isbanned(character, ROLE_SYNDICATE) && !QDELETED(character))
if(age_check(character.client))
if(!(character.job in restricted_jobs))
diff --git a/code/game/gamemodes/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm
index acb17d1b..d1d0d82b 100644
--- a/code/game/gamemodes/changeling/traitor_chan.dm
+++ b/code/game/gamemodes/changeling/traitor_chan.dm
@@ -68,7 +68,7 @@
..()
return
if(changelings.len <= (changelingcap - 2) || prob(100 / (csc * 4)))
- if(ROLE_CHANGELING in character.client.prefs.be_special)
+ if(ROLE_CHANGELING in character.client?.prefs?.be_special)
if(!jobban_isbanned(character, ROLE_CHANGELING) && !QDELETED(character) && !jobban_isbanned(character, ROLE_SYNDICATE) && !QDELETED(character))
if(age_check(character.client))
if(!(character.job in restricted_jobs))
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets.dm b/code/game/gamemodes/dynamic/dynamic_rulesets.dm
index fa944b17..1b2ccf30 100644
--- a/code/game/gamemodes/dynamic/dynamic_rulesets.dm
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets.dm
@@ -194,7 +194,7 @@
if(P.mind.special_role) // We really don't want to give antag to an antag.
candidates.Remove(P)
continue
- if (!(antag_flag in P.client.prefs.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override, ROLE_SYNDICATE))))//are they willing and not antag-banned?
+ if (!(antag_flag in P.client?.prefs?.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override, ROLE_SYNDICATE))))//are they willing and not antag-banned?
candidates.Remove(P)
continue
@@ -214,7 +214,7 @@
if(P.mind.special_role || P.mind.antag_datums?.len > 0) // Are they an antag already?
candidates.Remove(P)
continue
- if (!(antag_flag in P.client.prefs.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override, ROLE_SYNDICATE))))//are they willing and not antag-banned?
+ if (!(antag_flag in P.client?.prefs?.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override, ROLE_SYNDICATE))))//are they willing and not antag-banned?
candidates.Remove(P)
continue
if ((exclusive_roles.len > 0) && !(P.mind.assigned_role in exclusive_roles)) // Is the rule exclusive to their job?
@@ -224,4 +224,4 @@
/// Do your checks if the ruleset is ready to be executed here.
/// Should ignore certain checks if forced is TRUE
/datum/dynamic_ruleset/roundstart/ready(forced = FALSE)
- return ..()
\ No newline at end of file
+ return ..()
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_events.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_events.dm
index 89d5b514..014c1470 100644
--- a/code/game/gamemodes/dynamic/dynamic_rulesets_events.dm
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_events.dm
@@ -82,7 +82,7 @@
if(!mode.check_age(M.client, minimum_required_age))
trimmed_list.Remove(M)
continue
- if (!(antag_name in M.client.prefs.be_special) || jobban_isbanned(M.ckey, list(antag_name, ROLE_SYNDICATE)))//are they willing and not antag-banned?
+ if (!(antag_name in M.client?.prefs?.be_special) || jobban_isbanned(M.ckey, list(antag_name, ROLE_SYNDICATE)))//are they willing and not antag-banned?
trimmed_list.Remove(M)
continue
if (M.mind)
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm
index f59f2d87..9e5249de 100644
--- a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm
@@ -12,7 +12,7 @@
if(!mode.check_age(P.client, minimum_required_age))
candidates.Remove(P)
continue
- if (!(antag_flag in P.client.prefs.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override))))//are they willing and not antag-banned?
+ if (!(antag_flag in P.client?.prefs?.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override))))//are they willing and not antag-banned?
candidates.Remove(P)
continue
if (P.mind.assigned_role in restricted_roles) // Does their job allow for it?
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm
index f1032541..1f4e3ce8 100644
--- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm
@@ -52,7 +52,7 @@
if(!mode.check_age(M.client, minimum_required_age))
trimmed_list.Remove(M)
continue
- if (!(antag_name in M.client.prefs.be_special) || jobban_isbanned(M.ckey, list(antag_name, ROLE_SYNDICATE)))//are they willing and not antag-banned?
+ if (!(antag_name in M.client?.prefs?.be_special) || jobban_isbanned(M.ckey, list(antag_name, ROLE_SYNDICATE)))//are they willing and not antag-banned?
trimmed_list.Remove(M)
continue
if (M.mind)
@@ -77,11 +77,11 @@
trimmed_list.Remove(M)
continue
if(antag_flag_override)
- if(!(antag_flag_override in M.client.prefs.be_special) || jobban_isbanned(M.ckey, antag_flag_override))
+ if(!(antag_flag_override in M.client?.prefs?.be_special) || jobban_isbanned(M.ckey, antag_flag_override))
trimmed_list.Remove(M)
continue
else
- if(!(antag_flag in M.client.prefs.be_special) || jobban_isbanned(M.ckey, antag_flag))
+ if(!(antag_flag in M.client?.prefs?.be_special) || jobban_isbanned(M.ckey, antag_flag))
trimmed_list.Remove(M)
continue
return trimmed_list
@@ -257,7 +257,7 @@
if(issilicon(player)) // Your assigned role doesn't change when you are turned into a silicon.
living_players -= player
continue
- if(player.client.prefs.allow_midround_antag == 0) //Do they have midround traitor prefs enabled? If not, trim.
+ if(player.client?.prefs?.allow_midround_antag == 0) //Do they have midround traitor prefs enabled? If not, trim.
living_players -= player
continue
if(is_centcom_level(player.z))
@@ -361,7 +361,7 @@
if(!mode.check_age(M.client, minimum_required_age))
trimmed_list.Remove(M)
continue
- if (!(antag_name in M.client.prefs.be_special) || jobban_isbanned(M.ckey, list(antag_name, ROLE_SYNDICATE)))//are they willing and not antag-banned?
+ if (!(antag_name in M.client?.prefs?.be_special) || jobban_isbanned(M.ckey, list(antag_name, ROLE_SYNDICATE)))//are they willing and not antag-banned?
trimmed_list.Remove(M)
continue
if (M.mind)
@@ -378,7 +378,7 @@
/datum/dynamic_ruleset/midround/autotraitor/lewd/ready()
for(var/mob/living/target in living_players)
- if(target.client.prefs.noncon)
+ if(target.client?.prefs?.noncon)
targets += target
if(lewd_candidates.len)
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
index 3f4ff87d..f7ff0724 100644
--- a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
@@ -94,7 +94,7 @@
var/list/mob/living/carbon/human/targets = list()
for(var/mob/dead/new_player/target in GLOB.player_list)
- if(target.client.prefs.noncon)
+ if(target.client?.prefs?.noncon)
targets += target
if(candidates.len)
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 1f7b8216..b1e0f71c 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -152,7 +152,7 @@
var/list/antag_candidates = list()
for(var/mob/living/carbon/human/H in living_crew)
- if(H.client && H.client.prefs.allow_midround_antag)
+ if(H.client && H.client?.prefs?.allow_midround_antag)
antag_candidates += H
if(!antag_candidates)
@@ -359,7 +359,7 @@
for(var/mob/dead/new_player/player in players)
if(player.client && player.ready == PLAYER_READY_TO_PLAY)
- if(role in player.client.prefs.be_special)
+ if(role in player.client?.prefs?.be_special)
if(!jobban_isbanned(player, ROLE_SYNDICATE) && !QDELETED(player) && !jobban_isbanned(player, role) && !QDELETED(player)) //Nodrak/Carn: Antag Job-bans
if(age_check(player.client)) //Must be older than the minimum age
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
@@ -373,7 +373,7 @@
if(candidates.len < recommended_enemies)
for(var/mob/dead/new_player/player in players)
if(player.client && player.ready == PLAYER_READY_TO_PLAY)
- if(!(role in player.client.prefs.be_special)) // We don't have enough people who want to be antagonist, make a separate list of people who don't want to be one
+ if(!(role in player.client?.prefs?.be_special)) // We don't have enough people who want to be antagonist, make a separate list of people who don't want to be one
if(!jobban_isbanned(player, ROLE_SYNDICATE) && !QDELETED(player) && !jobban_isbanned(player, role) && !QDELETED(player) ) //Nodrak/Carn: Antag Job-bans
drafted += player.mind
diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm
index 5a896926..fdd400f1 100644
--- a/code/game/gamemodes/traitor/traitor.dm
+++ b/code/game/gamemodes/traitor/traitor.dm
@@ -84,7 +84,7 @@
if((SSticker.mode.traitors.len + pre_traitors.len) >= traitorcap) //Upper cap for number of latejoin antagonists
return
if((SSticker.mode.traitors.len + pre_traitors.len) <= (traitorcap - 2) || prob(100 / (tsc * 2)))
- if(antag_flag in character.client.prefs.be_special)
+ if(antag_flag in character.client?.prefs?.be_special)
if(!jobban_isbanned(character, ROLE_TRAITOR) && !QDELETED(character) && !jobban_isbanned(character, ROLE_SYNDICATE) && !QDELETED(character))
if(age_check(character.client))
if(!(character.job in restricted_jobs))
@@ -96,4 +96,4 @@
/datum/game_mode/traitor/generate_report()
return "Although more specific threats are commonplace, you should always remain vigilant for Syndicate agents aboard your station. Syndicate communications have implied that many \
- GATO employees are Syndicate agents with hidden memories that may be activated at a moment's notice, so it's possible that these agents might not even know their positions."
\ No newline at end of file
+ GATO employees are Syndicate agents with hidden memories that may be activated at a moment's notice, so it's possible that these agents might not even know their positions."
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 628e7cd1..38971005 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -402,7 +402,7 @@
//Do the resize on ejection. The clone pod seems to do a lot of matrix transforms the way size code does, so we will handle our resize after.
mob_occupant.previous_size = 1 //Set the previous size to default so the resize properly set health and speed.
- mob_occupant.custom_body_size = size //mob_occupant.client.prefs.body_size
+ mob_occupant.custom_body_size = size //mob_occupant.client?.prefs?.body_size
mob_occupant.resize(mob_occupant.custom_body_size * 0.01)
occupant = null
diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm
index a5365127..4ae5c871 100644
--- a/code/game/machinery/dance_machine.dm
+++ b/code/game/machinery/dance_machine.dm
@@ -433,7 +433,7 @@
. = ..()
if(active)
for(var/mob/living/M in range(10,src))
- if(!M.client || !(M.client.prefs.toggles & SOUND_INSTRUMENTS))
+ if(!M.client || !(M.client?.prefs?.toggles & SOUND_INSTRUMENTS))
continue
if(!(M in rangers))
rangers += M
diff --git a/code/game/machinery/telecomms/broadcasting.dm b/code/game/machinery/telecomms/broadcasting.dm
index 4e3e11d1..6be6ee4b 100644
--- a/code/game/machinery/telecomms/broadcasting.dm
+++ b/code/game/machinery/telecomms/broadcasting.dm
@@ -171,12 +171,12 @@
// Cut out mobs with clients who are admins and have radio chatter disabled.
for(var/mob/R in receive)
- if (R.client && R.client.holder && !(R.client.prefs.chat_toggles & CHAT_RADIO))
+ if (R.client && R.client.holder && !(R.client?.prefs?.chat_toggles & CHAT_RADIO))
receive -= R
// 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 && (M.client?.prefs?.chat_toggles & CHAT_GHOSTRADIO))
receive |= M
// Render the message and have everybody hear it.
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 43ac13fb..c0722167 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -787,8 +787,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
openToolTip(user,src,params,title = name,content = "[desc]
Force: [force_string]",theme = "")
/obj/item/MouseEntered(location, control, params)
- if((item_flags & IN_INVENTORY) && usr.client.prefs.enable_tips && !QDELETED(src))
- var/timedelay = usr.client.prefs.tip_delay/100
+ if((item_flags & IN_INVENTORY) && usr.client?.prefs?.enable_tips && !QDELETED(src))
+ var/timedelay = usr.client?.prefs?.tip_delay/100
var/user = usr
tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 8f540525..732c83aa 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -164,8 +164,8 @@ GLOBAL_LIST_EMPTY(PDAs)
if(equipped)
return
if(user.client)
- background_color = user.client.prefs.pda_color
- switch(user.client.prefs.pda_style)
+ background_color = user.client?.prefs?.pda_color
+ switch(user.client?.prefs?.pda_style)
if(MONO)
font_index = MODE_MONO
font_mode = FONT_MONO
@@ -181,7 +181,7 @@ GLOBAL_LIST_EMPTY(PDAs)
else
font_index = MODE_MONO
font_mode = FONT_MONO
- var/pref_skin = GLOB.pda_reskins[user.client.prefs.pda_skin]
+ var/pref_skin = GLOB.pda_reskins[user.client?.prefs?.pda_skin]
if(icon != pref_skin)
icon = pref_skin
update_icon(FALSE, TRUE)
@@ -778,7 +778,7 @@ GLOBAL_LIST_EMPTY(PDAs)
// Show it to ghosts
var/ghost_message = "[owner] PDA Message --> [target_text]: "
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 && (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/devices/dogborg_sleeper.dm b/code/game/objects/items/devices/dogborg_sleeper.dm
index d4790cf7..dcb5cb4b 100644
--- a/code/game/objects/items/devices/dogborg_sleeper.dm
+++ b/code/game/objects/items/devices/dogborg_sleeper.dm
@@ -78,7 +78,7 @@
if(!iscarbon(target))
return
var/voracious = TRUE
- if(!target.client || !(target.client.prefs.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
+ if(!target.client || !(target.client?.prefs?.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client?.prefs?.cit_toggles & MEDIHOUND_SLEEPER))
voracious = FALSE
if(target.buckled)
to_chat(user, "The user is buckled and can not be put into your [src].")
@@ -121,7 +121,7 @@
if(user.a_intent == INTENT_HELP)
return
var/voracious = TRUE
- if(!user.client || !(user.client.prefs.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
+ if(!user.client || !(user.client?.prefs?.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client?.prefs?.cit_toggles & MEDIHOUND_SLEEPER))
voracious = FALSE
user.visible_message("You see [voracious ? "[user] struggling against the expanded material of [hound]'s gut!" : "and hear [user] pounding against something inside of [hound]'s [src.name]!"]", \
"[voracious ? "You start struggling inside of [src]'s tight, flexible confines," : "You start pounding against the metallic walls of [src],"] trying to trigger the release... (this will take about [DisplayTimeText(breakout_time)].)", \
@@ -136,11 +136,11 @@
var/list/targets = target && hound ? list(target) : contents
if(hound)
//hound.setClickCooldown(50) Not needed?
- if(!hound.client || !(hound.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
+ if(!hound.client || !(hound.client?.prefs?.cit_toggles & MEDIHOUND_SLEEPER))
voracious = FALSE
else
for(var/mob/M in targets)
- if(!M.client || !(M.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
+ if(!M.client || !(M.client?.prefs?.cit_toggles & MEDIHOUND_SLEEPER))
voracious = FALSE
if(length(targets))
if(hound)
@@ -263,7 +263,7 @@
patient_laststat = patient.stat
prociconupdate = TRUE
- if(!patient.client || !(patient.client.prefs.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
+ if(!patient.client || !(patient.client?.prefs?.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client?.prefs?.cit_toggles & MEDIHOUND_SLEEPER))
hound.sleeper_nv = TRUE
else
hound.sleeper_nv = FALSE
@@ -288,7 +288,7 @@
hound.sleeper_g = 1
patient_laststat = patient.stat
- if(!patient.client || !(patient.client.prefs.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
+ if(!patient.client || !(patient.client?.prefs?.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client?.prefs?.cit_toggles & MEDIHOUND_SLEEPER))
hound.sleeper_nv = TRUE
else
hound.sleeper_nv = FALSE
@@ -345,7 +345,7 @@
var/turf/source = get_turf(hound)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/H in get_hearers_in_view(3, source))
- if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
+ if(!H.client || !(H.client?.prefs?.cit_toggles & DIGESTION_NOISES))
continue
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
@@ -389,7 +389,7 @@
var/turf/source = get_turf(hound)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/H in get_hearers_in_view(3, source))
- if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
+ if(!H.client || !(H.client?.prefs?.cit_toggles & DIGESTION_NOISES))
continue
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
diff --git a/code/game/objects/structures/life_candle.dm b/code/game/objects/structures/life_candle.dm
index 0ae0e294..475d80c0 100644
--- a/code/game/objects/structures/life_candle.dm
+++ b/code/game/objects/structures/life_candle.dm
@@ -81,7 +81,7 @@
body = new mob_type(T)
var/mob/ghostie = mind.get_ghost(TRUE)
if(ghostie.client && ghostie.client.prefs)
- ghostie.client.prefs.copy_to(body)
+ ghostie.client?.prefs?.copy_to(body)
mind.transfer_to(body)
else
body.forceMove(T)
diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm
index df6d033a..419c60dc 100644
--- a/code/game/objects/structures/musician.dm
+++ b/code/game/objects/structures/musician.dm
@@ -67,7 +67,7 @@
if((world.time - MUSICIAN_HEARCHECK_MINDELAY) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/M in get_hearers_in_view(15, source))
- if(!M.client || !(M.client.prefs.toggles & SOUND_INSTRUMENTS))
+ if(!M.client || !(M.client?.prefs?.toggles & SOUND_INSTRUMENTS))
continue
LAZYADD(hearing_mobs, M)
last_hearcheck = world.time
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 9596b91f..6f6ff516 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -104,7 +104,7 @@
if(M.client)
body += "| Prison | "
body += "\ Send back to Lobby | "
- var/muted = M.client.prefs.muted
+ var/muted = M.client?.prefs?.muted
body += "
Mute: "
body += "\[IC | "
body += "OOC | "
diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm
index 2323de4e..1dd2d413 100644
--- a/code/modules/admin/secrets.dm
+++ b/code/modules/admin/secrets.dm
@@ -743,7 +743,7 @@
if (length(players))
var/mob/chosen = players[1]
if (chosen.client)
- chosen.client.prefs.copy_to(spawnedMob)
+ chosen.client?.prefs?.copy_to(spawnedMob)
spawnedMob.key = chosen.key
players -= chosen
if (ishuman(spawnedMob) && ispath(humanoutfit, /datum/outfit))
diff --git a/code/modules/admin/sound_emitter.dm b/code/modules/admin/sound_emitter.dm
index 702e2071..fbc8ab0c 100644
--- a/code/modules/admin/sound_emitter.dm
+++ b/code/modules/admin/sound_emitter.dm
@@ -142,7 +142,7 @@
if(SOUND_EMITTER_GLOBAL)
hearing_mobs = GLOB.player_list.Copy()
for(var/mob/M in hearing_mobs)
- if(M.client.prefs.toggles & SOUND_MIDI)
+ if(M.client?.prefs?.toggles & SOUND_MIDI)
M.playsound_local(M, sound_file, sound_volume, FALSE, channel = CHANNEL_ADMIN, pressure_affected = FALSE)
if(user)
log_admin("[ADMIN_LOOKUPFLW(user)] activated a sound emitter with file \"[sound_file]\" at [AREACOORD(src)]")
diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm
index 4df6f226..e19dc832 100644
--- a/code/modules/admin/verbs/deadsay.dm
+++ b/code/modules/admin/verbs/deadsay.dm
@@ -26,7 +26,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 && 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/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 39dac328..6361fa42 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -32,7 +32,7 @@
/datum/admins/proc/isReadytoRumble(mob/living/carbon/human/applicant, targetrole, onstation = TRUE, conscious = TRUE)
if(applicant.mind.special_role)
return FALSE
- if(!(targetrole in applicant.client.prefs.be_special))
+ if(!(targetrole in applicant.client?.prefs?.be_special))
return FALSE
if(onstation)
var/turf/T = get_turf(applicant)
@@ -412,7 +412,7 @@
//Spawn the body
var/mob/living/carbon/human/ERTOperative = new ertemplate.mobtype(spawnloc)
- chosen_candidate.client.prefs.copy_to(ERTOperative)
+ chosen_candidate.client?.prefs?.copy_to(ERTOperative)
ERTOperative.key = chosen_candidate.key
if(ertemplate.enforce_human || ERTOperative.dna.species.dangerous_existence) // Don't want any exploding plasmemes
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index cbbec40f..13766ba0 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -33,7 +33,7 @@
message_admins("[key_name_admin(src)] played sound [S]")
for(var/mob/M in GLOB.player_list)
- if(M.client.prefs.toggles & SOUND_MIDI)
+ if(M.client?.prefs?.toggles & SOUND_MIDI)
var/user_vol = M.client.chatOutput.adminMusicVolume
if(user_vol)
admin_sound.volume = vol * (user_vol / 100)
diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm
index f3da1954..4ef300d0 100644
--- a/code/modules/admin/verbs/pray.dm
+++ b/code/modules/admin/verbs/pray.dm
@@ -11,7 +11,7 @@
return
log_prayer("[src.key]/([src.name]): [msg]")
if(usr.client)
- if(usr.client.prefs.muted & MUTE_PRAY)
+ if(usr.client?.prefs?.muted & MUTE_PRAY)
to_chat(usr, "You cannot pray (muted).")
return
if(src.client.handle_spam_prevention(msg,MUTE_PRAY))
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index e426765f..c8e9b071 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -288,7 +288,7 @@
for(var/mob/M in GLOB.player_list)
if(M.stat != DEAD)
continue //we are not dead!
- if(!(ROLE_ALIEN in M.client.prefs.be_special))
+ if(!(ROLE_ALIEN in M.client?.prefs?.be_special))
continue //we don't want to be an alium
if(M.client.is_afk())
continue //we are afk
diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm
index 2fc0a801..ef93c231 100644
--- a/code/modules/antagonists/_common/antag_datum.dm
+++ b/code/modules/antagonists/_common/antag_datum.dm
@@ -181,7 +181,7 @@ GLOBAL_LIST_EMPTY(antagonists)
/datum/antagonist/proc/enabled_in_preferences(datum/mind/M)
if(job_rank)
- if(M.current && M.current.client && (job_rank in M.current.client.prefs.be_special))
+ if(M.current && M.current.client && (job_rank in M.current.client?.prefs?.be_special))
return TRUE
else
return FALSE
diff --git a/code/modules/antagonists/blob/blob/overmind.dm b/code/modules/antagonists/blob/blob/overmind.dm
index 0c83826a..74f9bf67 100644
--- a/code/modules/antagonists/blob/blob/overmind.dm
+++ b/code/modules/antagonists/blob/blob/overmind.dm
@@ -192,7 +192,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
return
if (src.client)
- if(client.prefs.muted & MUTE_IC)
+ if(client?.prefs?.muted & MUTE_IC)
to_chat(src, "You cannot send IC messages (muted).")
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
diff --git a/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm b/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm
index 905f6034..7badabdb 100644
--- a/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm
+++ b/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm
@@ -80,7 +80,7 @@
/mob/camera/eminence/say(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
if(client)
- if(client.prefs.muted & MUTE_IC)
+ if(client?.prefs?.muted & MUTE_IC)
to_chat(src, "You cannot send IC messages (muted).")
return
if(client.handle_spam_prevention(message,MUTE_IC))
diff --git a/code/modules/antagonists/revolution/revolution.dm b/code/modules/antagonists/revolution/revolution.dm
index d30c9950..dcf4cde3 100644
--- a/code/modules/antagonists/revolution/revolution.dm
+++ b/code/modules/antagonists/revolution/revolution.dm
@@ -286,7 +286,7 @@
var/list/datum/mind/promotable = list()
for(var/datum/mind/khrushchev in non_heads)
if(khrushchev.current && !khrushchev.current.incapacitated() && !khrushchev.current.restrained() && khrushchev.current.client && khrushchev.current.stat != DEAD)
- if(ROLE_REV in khrushchev.current.client.prefs.be_special)
+ if(ROLE_REV in khrushchev.current.client?.prefs?.be_special)
promotable += khrushchev
if(promotable.len)
var/datum/mind/new_leader = pick(promotable)
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index e7f96e05..4462c5d7 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -383,7 +383,7 @@
if(IsAdminGhost(user))
attack_ai(user)
return FALSE
- else if(user.client.prefs.inquisitive_ghost)
+ else if(user.client?.prefs?.inquisitive_ghost)
user.examinate(src)
return FALSE
return FALSE
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index c0e71527..2a5dbd5b 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -1025,7 +1025,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "Widescreen: [widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]
"
dat += "Auto stand: [autostand ? "Enabled" : "Disabled"]
"
dat += "Screen Shake: [(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]
"
- if (user && user.client && !user.client.prefs.screenshake==0)
+ if (user && user.client && !user.client?.prefs?.screenshake==0)
dat += "Damage Screen Shake: [(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]
"
//GS13
diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm
index d194dc55..34cc77c2 100644
--- a/code/modules/client/preferences_toggles.dm
+++ b/code/modules/client/preferences_toggles.dm
@@ -16,8 +16,8 @@
set name = "Game Preferences"
set category = "Preferences"
set desc = "Open Game Preferences Window"
- usr.client.prefs.current_tab = 1
- usr.client.prefs.ShowChoices(usr)
+ usr.client?.prefs?.current_tab = 1
+ usr.client?.prefs?.ShowChoices(usr)
//toggles
/datum/verbs/menu/Settings/Ghost/chatterbox
@@ -27,10 +27,10 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox, toggle_ghost_ears)(
set name = "Show/Hide GhostEars"
set category = "Preferences"
set desc = "See All Speech"
- usr.client.prefs.chat_toggles ^= CHAT_GHOSTEARS
- to_chat(usr, "As a ghost, you will now [(usr.client.prefs.chat_toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].")
- usr.client.prefs.save_preferences()
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Ears", "[usr.client.prefs.chat_toggles & CHAT_GHOSTEARS ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ usr.client?.prefs?.chat_toggles ^= CHAT_GHOSTEARS
+ to_chat(usr, "As a ghost, you will now [(usr.client?.prefs?.chat_toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].")
+ usr.client?.prefs?.save_preferences()
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Ears", "[usr.client?.prefs?.chat_toggles & CHAT_GHOSTEARS ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/Ghost/chatterbox/toggle_ghost_ears/Get_checked(client/C)
return C.prefs.chat_toggles & CHAT_GHOSTEARS
@@ -38,10 +38,10 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox, toggle_ghost_sight)
set name = "Show/Hide GhostSight"
set category = "Preferences"
set desc = "See All Emotes"
- usr.client.prefs.chat_toggles ^= CHAT_GHOSTSIGHT
- to_chat(usr, "As a ghost, you will now [(usr.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].")
- usr.client.prefs.save_preferences()
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Sight", "[usr.client.prefs.chat_toggles & CHAT_GHOSTSIGHT ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ usr.client?.prefs?.chat_toggles ^= CHAT_GHOSTSIGHT
+ to_chat(usr, "As a ghost, you will now [(usr.client?.prefs?.chat_toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].")
+ usr.client?.prefs?.save_preferences()
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Sight", "[usr.client?.prefs?.chat_toggles & CHAT_GHOSTSIGHT ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/Ghost/chatterbox/toggle_ghost_sight/Get_checked(client/C)
return C.prefs.chat_toggles & CHAT_GHOSTSIGHT
@@ -49,10 +49,10 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox, toggle_ghost_whispe
set name = "Show/Hide GhostWhispers"
set category = "Preferences"
set desc = "See All Whispers"
- usr.client.prefs.chat_toggles ^= CHAT_GHOSTWHISPER
- to_chat(usr, "As a ghost, you will now [(usr.client.prefs.chat_toggles & CHAT_GHOSTWHISPER) ? "see all whispers in the world" : "only see whispers from nearby mobs"].")
- usr.client.prefs.save_preferences()
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Whispers", "[usr.client.prefs.chat_toggles & CHAT_GHOSTWHISPER ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ usr.client?.prefs?.chat_toggles ^= CHAT_GHOSTWHISPER
+ to_chat(usr, "As a ghost, you will now [(usr.client?.prefs?.chat_toggles & CHAT_GHOSTWHISPER) ? "see all whispers in the world" : "only see whispers from nearby mobs"].")
+ usr.client?.prefs?.save_preferences()
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Whispers", "[usr.client?.prefs?.chat_toggles & CHAT_GHOSTWHISPER ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/Ghost/chatterbox/toggle_ghost_whispers/Get_checked(client/C)
return C.prefs.chat_toggles & CHAT_GHOSTWHISPER
@@ -62,10 +62,10 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox, toggle_ghost_radio)
set name = "Show/Hide GhostRadio"
set category = "Preferences"
set desc = "See All Radio Chatter"
- usr.client.prefs.chat_toggles ^= CHAT_GHOSTRADIO
- to_chat(usr, "As a ghost, you will now [(usr.client.prefs.chat_toggles & CHAT_GHOSTRADIO) ? "see radio chatter" : "not see radio chatter"].")
- usr.client.prefs.save_preferences()
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Radio", "[usr.client.prefs.chat_toggles & CHAT_GHOSTRADIO ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //social experiment, increase the generation whenever you copypaste this shamelessly GENERATION 1
+ usr.client?.prefs?.chat_toggles ^= CHAT_GHOSTRADIO
+ to_chat(usr, "As a ghost, you will now [(usr.client?.prefs?.chat_toggles & CHAT_GHOSTRADIO) ? "see radio chatter" : "not see radio chatter"].")
+ usr.client?.prefs?.save_preferences()
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost Radio", "[usr.client?.prefs?.chat_toggles & CHAT_GHOSTRADIO ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //social experiment, increase the generation whenever you copypaste this shamelessly GENERATION 1
/datum/verbs/menu/Settings/Ghost/chatterbox/toggle_ghost_radio/Get_checked(client/C)
return C.prefs.chat_toggles & CHAT_GHOSTRADIO
@@ -73,10 +73,10 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox, toggle_ghost_pda)()
set name = "Show/Hide GhostPDA"
set category = "Preferences"
set desc = "See All PDA Messages"
- usr.client.prefs.chat_toggles ^= CHAT_GHOSTPDA
- to_chat(usr, "As a ghost, you will now [(usr.client.prefs.chat_toggles & CHAT_GHOSTPDA) ? "see all pda messages in the world" : "only see pda messages from nearby mobs"].")
- usr.client.prefs.save_preferences()
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost PDA", "[usr.client.prefs.chat_toggles & CHAT_GHOSTPDA ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ usr.client?.prefs?.chat_toggles ^= CHAT_GHOSTPDA
+ to_chat(usr, "As a ghost, you will now [(usr.client?.prefs?.chat_toggles & CHAT_GHOSTPDA) ? "see all pda messages in the world" : "only see pda messages from nearby mobs"].")
+ usr.client?.prefs?.save_preferences()
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ghost PDA", "[usr.client?.prefs?.chat_toggles & CHAT_GHOSTPDA ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/Ghost/chatterbox/toggle_ghost_pda/Get_checked(client/C)
return C.prefs.chat_toggles & CHAT_GHOSTPDA
@@ -88,10 +88,10 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox/Events, toggle_death
set name = "Toggle Deathrattle"
set category = "Preferences"
set desc = "Death"
- usr.client.prefs.toggles ^= DISABLE_DEATHRATTLE
- usr.client.prefs.save_preferences()
- to_chat(usr, "You will [(usr.client.prefs.toggles & DISABLE_DEATHRATTLE) ? "no longer" : "now"] get messages when a sentient mob dies.")
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Deathrattle", "[!(usr.client.prefs.toggles & DISABLE_DEATHRATTLE) ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, maybe you should spend some time reading the comments.
+ usr.client?.prefs?.toggles ^= DISABLE_DEATHRATTLE
+ usr.client?.prefs?.save_preferences()
+ to_chat(usr, "You will [(usr.client?.prefs?.toggles & DISABLE_DEATHRATTLE) ? "no longer" : "now"] get messages when a sentient mob dies.")
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Deathrattle", "[!(usr.client?.prefs?.toggles & DISABLE_DEATHRATTLE) ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, maybe you should spend some time reading the comments.
/datum/verbs/menu/Settings/Ghost/chatterbox/Events/toggle_deathrattle/Get_checked(client/C)
return !(C.prefs.toggles & DISABLE_DEATHRATTLE)
@@ -99,10 +99,10 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost/chatterbox/Events, toggle_arriv
set name = "Toggle Arrivalrattle"
set category = "Preferences"
set desc = "New Player Arrival"
- usr.client.prefs.toggles ^= DISABLE_ARRIVALRATTLE
- to_chat(usr, "You will [(usr.client.prefs.toggles & DISABLE_ARRIVALRATTLE) ? "no longer" : "now"] get messages when someone joins the station.")
- usr.client.prefs.save_preferences()
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Arrivalrattle", "[!(usr.client.prefs.toggles & DISABLE_ARRIVALRATTLE) ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, maybe you should rethink where your life went so wrong.
+ usr.client?.prefs?.toggles ^= DISABLE_ARRIVALRATTLE
+ to_chat(usr, "You will [(usr.client?.prefs?.toggles & DISABLE_ARRIVALRATTLE) ? "no longer" : "now"] get messages when someone joins the station.")
+ usr.client?.prefs?.save_preferences()
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Arrivalrattle", "[!(usr.client?.prefs?.toggles & DISABLE_ARRIVALRATTLE) ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, maybe you should rethink where your life went so wrong.
/datum/verbs/menu/Settings/Ghost/chatterbox/Events/toggle_arrivalrattle/Get_checked(client/C)
return !(C.prefs.toggles & DISABLE_ARRIVALRATTLE)
@@ -110,10 +110,10 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Ghost, togglemidroundantag)()
set name = "Toggle Midround Antagonist"
set category = "Preferences"
set desc = "Midround Antagonist"
- usr.client.prefs.toggles ^= MIDROUND_ANTAG
- usr.client.prefs.save_preferences()
- to_chat(usr, "You will [(usr.client.prefs.toggles & MIDROUND_ANTAG) ? "now" : "no longer"] be considered for midround antagonist positions.")
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Midround Antag", "[usr.client.prefs.toggles & MIDROUND_ANTAG ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ usr.client?.prefs?.toggles ^= MIDROUND_ANTAG
+ usr.client?.prefs?.save_preferences()
+ to_chat(usr, "You will [(usr.client?.prefs?.toggles & MIDROUND_ANTAG) ? "now" : "no longer"] be considered for midround antagonist positions.")
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Midround Antag", "[usr.client?.prefs?.toggles & MIDROUND_ANTAG ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/Ghost/togglemidroundantag/Get_checked(client/C)
return C.prefs.toggles & MIDROUND_ANTAG
@@ -121,16 +121,16 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggletitlemusic)()
set name = "Hear/Silence Lobby Music"
set category = "Preferences"
set desc = "Hear Music In Lobby"
- usr.client.prefs.toggles ^= SOUND_LOBBY
- usr.client.prefs.save_preferences()
- if(usr.client.prefs.toggles & SOUND_LOBBY)
+ usr.client?.prefs?.toggles ^= SOUND_LOBBY
+ usr.client?.prefs?.save_preferences()
+ if(usr.client?.prefs?.toggles & SOUND_LOBBY)
to_chat(usr, "You will now hear music in the game lobby.")
if(isnewplayer(usr))
usr.client.playtitlemusic()
else
to_chat(usr, "You will no longer hear music in the game lobby.")
usr.stop_sound_channel(CHANNEL_LOBBYMUSIC)
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Lobby Music", "[usr.client.prefs.toggles & SOUND_LOBBY ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Lobby Music", "[usr.client?.prefs?.toggles & SOUND_LOBBY ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/Sound/toggletitlemusic/Get_checked(client/C)
return C.prefs.toggles & SOUND_LOBBY
@@ -139,9 +139,9 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, togglemidis)()
set name = "Hear/Silence Midis"
set category = "Preferences"
set desc = "Hear Admin Triggered Sounds (Midis)"
- usr.client.prefs.toggles ^= SOUND_MIDI
- usr.client.prefs.save_preferences()
- if(usr.client.prefs.toggles & SOUND_MIDI)
+ usr.client?.prefs?.toggles ^= SOUND_MIDI
+ usr.client?.prefs?.save_preferences()
+ if(usr.client?.prefs?.toggles & SOUND_MIDI)
to_chat(usr, "You will now hear any sounds uploaded by admins.")
else
to_chat(usr, "You will no longer hear sounds uploaded by admins")
@@ -149,7 +149,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, togglemidis)()
var/client/C = usr.client
if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded)
C.chatOutput.stopMusic()
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Hearing Midis", "[usr.client.prefs.toggles & SOUND_MIDI ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Hearing Midis", "[usr.client?.prefs?.toggles & SOUND_MIDI ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/Sound/togglemidis/Get_checked(client/C)
return C.prefs.toggles & SOUND_MIDI
@@ -158,13 +158,13 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggle_instruments)()
set name = "Hear/Silence Instruments"
set category = "Preferences"
set desc = "Hear In-game Instruments"
- usr.client.prefs.toggles ^= SOUND_INSTRUMENTS
- usr.client.prefs.save_preferences()
- if(usr.client.prefs.toggles & SOUND_INSTRUMENTS)
+ usr.client?.prefs?.toggles ^= SOUND_INSTRUMENTS
+ usr.client?.prefs?.save_preferences()
+ if(usr.client?.prefs?.toggles & SOUND_INSTRUMENTS)
to_chat(usr, "You will now hear people playing musical instruments.")
else
to_chat(usr, "You will no longer hear musical instruments.")
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Instruments", "[usr.client.prefs.toggles & SOUND_INSTRUMENTS ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Instruments", "[usr.client?.prefs?.toggles & SOUND_INSTRUMENTS ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/Sound/toggle_instruments/Get_checked(client/C)
return C.prefs.toggles & SOUND_INSTRUMENTS
@@ -173,15 +173,15 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, Toggle_Soundscape)()
set name = "Hear/Silence Ambience"
set category = "Preferences"
set desc = "Hear Ambient Sound Effects"
- usr.client.prefs.toggles ^= SOUND_AMBIENCE
- usr.client.prefs.save_preferences()
- if(usr.client.prefs.toggles & SOUND_AMBIENCE)
+ usr.client?.prefs?.toggles ^= SOUND_AMBIENCE
+ usr.client?.prefs?.save_preferences()
+ if(usr.client?.prefs?.toggles & SOUND_AMBIENCE)
to_chat(usr, "You will now hear ambient sounds.")
else
to_chat(usr, "You will no longer hear ambient sounds.")
usr.stop_sound_channel(CHANNEL_AMBIENCE)
usr.stop_sound_channel(CHANNEL_BUZZ)
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ambience", "[usr.client.prefs.toggles & SOUND_AMBIENCE ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ambience", "[usr.client?.prefs?.toggles & SOUND_AMBIENCE ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/Sound/Toggle_Soundscape/Get_checked(client/C)
return C.prefs.toggles & SOUND_AMBIENCE
@@ -190,15 +190,15 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggle_ship_ambience)()
set name = "Hear/Silence Ship Ambience"
set category = "Preferences"
set desc = "Hear Ship Ambience Roar"
- usr.client.prefs.toggles ^= SOUND_SHIP_AMBIENCE
- usr.client.prefs.save_preferences()
- if(usr.client.prefs.toggles & SOUND_SHIP_AMBIENCE)
+ usr.client?.prefs?.toggles ^= SOUND_SHIP_AMBIENCE
+ usr.client?.prefs?.save_preferences()
+ if(usr.client?.prefs?.toggles & SOUND_SHIP_AMBIENCE)
to_chat(usr, "You will now hear ship ambience.")
else
to_chat(usr, "You will no longer hear ship ambience.")
usr.stop_sound_channel(CHANNEL_BUZZ)
usr.client.ambience_playing = 0
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ship Ambience", "[usr.client.prefs.toggles & SOUND_SHIP_AMBIENCE ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, I bet you read this comment expecting to see the same thing :^)
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Ship Ambience", "[usr.client?.prefs?.toggles & SOUND_SHIP_AMBIENCE ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, I bet you read this comment expecting to see the same thing :^)
/datum/verbs/menu/Settings/Sound/toggle_ship_ambience/Get_checked(client/C)
return C.prefs.toggles & SOUND_SHIP_AMBIENCE
@@ -207,10 +207,10 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggle_announcement_sound)()
set name = "Hear/Silence Announcements"
set category = "Preferences"
set desc = "Hear Announcement Sound"
- usr.client.prefs.toggles ^= SOUND_ANNOUNCEMENTS
- to_chat(usr, "You will now [(usr.client.prefs.toggles & SOUND_ANNOUNCEMENTS) ? "hear announcement sounds" : "no longer hear announcements"].")
- usr.client.prefs.save_preferences()
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Announcement Sound", "[usr.client.prefs.toggles & SOUND_ANNOUNCEMENTS ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ usr.client?.prefs?.toggles ^= SOUND_ANNOUNCEMENTS
+ to_chat(usr, "You will now [(usr.client?.prefs?.toggles & SOUND_ANNOUNCEMENTS) ? "hear announcement sounds" : "no longer hear announcements"].")
+ usr.client?.prefs?.save_preferences()
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Announcement Sound", "[usr.client?.prefs?.toggles & SOUND_ANNOUNCEMENTS ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/Sound/toggle_announcement_sound/Get_checked(client/C)
return C.prefs.toggles & SOUND_ANNOUNCEMENTS
@@ -219,13 +219,13 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggleprayersounds)()
set name = "Hear/Silence Prayer Sounds"
set category = "Preferences"
set desc = "Hear Prayer Sounds"
- usr.client.prefs.toggles ^= SOUND_PRAYERS
- usr.client.prefs.save_preferences()
- if(usr.client.prefs.toggles & SOUND_PRAYERS)
+ usr.client?.prefs?.toggles ^= SOUND_PRAYERS
+ usr.client?.prefs?.save_preferences()
+ if(usr.client?.prefs?.toggles & SOUND_PRAYERS)
to_chat(usr, "You will now hear prayer sounds.")
else
to_chat(usr, "You will no longer prayer sounds.")
- SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Prayer Sounds", "[usr.client.prefs.toggles & SOUND_PRAYERS ? "Enabled" : "Disabled"]"))
+ SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Prayer Sounds", "[usr.client?.prefs?.toggles & SOUND_PRAYERS ? "Enabled" : "Disabled"]"))
/datum/verbs/menu/Settings/Sound/toggleprayersounds/Get_checked(client/C)
return C.prefs.toggles & SOUND_PRAYERS
@@ -244,10 +244,10 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings, listen_ooc)()
set name = "Show/Hide OOC"
set category = "Preferences"
set desc = "Show OOC Chat"
- usr.client.prefs.chat_toggles ^= CHAT_OOC
- usr.client.prefs.save_preferences()
- to_chat(usr, "You will [(usr.client.prefs.chat_toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.")
- SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Seeing OOC", "[usr.client.prefs.chat_toggles & CHAT_OOC ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ usr.client?.prefs?.chat_toggles ^= CHAT_OOC
+ usr.client?.prefs?.save_preferences()
+ to_chat(usr, "You will [(usr.client?.prefs?.chat_toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.")
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Seeing OOC", "[usr.client?.prefs?.chat_toggles & CHAT_OOC ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/verbs/menu/Settings/listen_ooc/Get_checked(client/C)
return C.prefs.chat_toggles & CHAT_OOC
diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm
index 7625f229..99ab2991 100644
--- a/code/modules/clothing/glasses/_glasses.dm
+++ b/code/modules/clothing/glasses/_glasses.dm
@@ -433,8 +433,8 @@
if(glass_colour_type && ishuman(user))
var/mob/living/carbon/human/H = user
if(H.client?.prefs && src == H.glasses)
- H.client.prefs.uses_glasses_colour = !H.client.prefs.uses_glasses_colour
- if(H.client.prefs.uses_glasses_colour)
+ H.client?.prefs?.uses_glasses_colour = !H.client?.prefs?.uses_glasses_colour
+ if(H.client?.prefs?.uses_glasses_colour)
to_chat(H, "You will now see glasses colors.")
else
to_chat(H, "You will no longer see glasses colors.")
@@ -453,7 +453,7 @@
/mob/living/carbon/human/proc/update_glasses_color(obj/item/clothing/glasses/G, glasses_equipped)
- if(client && client.prefs.uses_glasses_colour && glasses_equipped)
+ if(client && client?.prefs?.uses_glasses_colour && glasses_equipped)
add_client_colour(G.glass_colour_type)
else
remove_client_colour(G.glass_colour_type)
diff --git a/code/modules/events/aurora_caelus.dm b/code/modules/events/aurora_caelus.dm
index c467e610..18a21eb4 100644
--- a/code/modules/events/aurora_caelus.dm
+++ b/code/modules/events/aurora_caelus.dm
@@ -25,7 +25,7 @@
sender_override = "GATO Meteorology Division")
for(var/V in GLOB.player_list)
var/mob/M = V
- if((M.client.prefs.toggles & SOUND_MIDI) && is_station_level(M.z))
+ if((M.client?.prefs?.toggles & SOUND_MIDI) && is_station_level(M.z))
M.playsound_local(M, pick('sound/ambience/aurora_caelus_new.ogg','sound/ambience/aurora_caelus.ogg'), 40, FALSE, pressure_affected = FALSE) //ogg is "The Fire is Gone" by Heaven Pierce Her, used in the videogame ULTRAKILL. All respects and credits to the equivalent artists who worked on it.
start_checking()
diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm
index 41d08789..258dffe7 100644
--- a/code/modules/jobs/job_types/captain.dm
+++ b/code/modules/jobs/job_types/captain.dm
@@ -39,7 +39,7 @@ Captain
throw EXCEPTION("[H.nameless ? "Captain" : "Captain [H.real_name]"] ([H.x],[H.y],[H.z]) has no client.")
return
- var/displayed_rank = H.client.prefs.alt_titles_preferences[title]
+ var/displayed_rank = H.client?.prefs?.alt_titles_preferences[title]
if(!displayed_rank) //Default to Captain
displayed_rank = "Captain"
diff --git a/code/modules/jobs/job_types/civilian_chaplain.dm b/code/modules/jobs/job_types/civilian_chaplain.dm
index 5f3daf1b..275d542d 100644
--- a/code/modules/jobs/job_types/civilian_chaplain.dm
+++ b/code/modules/jobs/job_types/civilian_chaplain.dm
@@ -39,12 +39,12 @@ Chaplain
return
var/new_religion = "Christianity"
- if(M.client && M.client.prefs.custom_names["religion"])
- new_religion = M.client.prefs.custom_names["religion"]
+ if(M.client && M.client?.prefs?.custom_names["religion"])
+ new_religion = M.client?.prefs?.custom_names["religion"]
var/new_deity = "Space Jesus"
- if(M.client && M.client.prefs.custom_names["deity"])
- new_deity = M.client.prefs.custom_names["deity"]
+ if(M.client && M.client?.prefs?.custom_names["deity"])
+ new_deity = M.client?.prefs?.custom_names["deity"]
B.deity_name = new_deity
diff --git a/code/modules/jobs/job_types/security.dm b/code/modules/jobs/job_types/security.dm
index 0b18fd65..099d4203 100644
--- a/code/modules/jobs/job_types/security.dm
+++ b/code/modules/jobs/job_types/security.dm
@@ -227,7 +227,7 @@ GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, S
// Assign department security
var/department
if(M && M.client && M.client.prefs)
- department = M.client.prefs.prefered_security_department
+ department = M.client?.prefs?.prefered_security_department
if(!LAZYLEN(GLOB.available_depts) || department == "None")
return
else if(department in GLOB.available_depts)
@@ -387,7 +387,7 @@ Junior Security Officer
// Assign department security
var/department
if(M && M.client && M.client.prefs)
- department = M.client.prefs.prefered_security_department
+ department = M.client?.prefs?.prefered_security_department
if(!LAZYLEN(GLOB.available_depts) || department == "None")
return
else if(department in GLOB.available_depts)
diff --git a/code/modules/mob/dead/new_player/login.dm b/code/modules/mob/dead/new_player/login.dm
index acd96641..3b371103 100644
--- a/code/modules/mob/dead/new_player/login.dm
+++ b/code/modules/mob/dead/new_player/login.dm
@@ -37,8 +37,8 @@
postfix = "soon"
to_chat(src, "Please set up your character and select \"Ready\". The game will start [postfix].")
- if(client.prefs.path) //Hyper edit: notify of a newer preference version
- var/savefile/S = new /savefile(client.prefs.path)
+ if(client?.prefs?.path) //Hyper edit: notify of a newer preference version
+ var/savefile/S = new /savefile(client?.prefs?.path)
if(S)
S.cd = "/"
var/slot
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index b8a14a9d..25305c16 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -32,7 +32,7 @@
return
/mob/dead/new_player/proc/new_player_panel()
- var/output = "
Welcome, [client ? client.prefs.real_name : "Unknown User"]
" + var/output = "Welcome, [client ? client?.prefs?.real_name : "Unknown User"]
" output += "" if(SSticker.current_state <= GAME_STATE_PREGAME) @@ -93,7 +93,7 @@ relevant_cap = max(hpc, epc) if(href_list["show_preferences"]) - client.prefs.ShowChoices(src) + client?.prefs?.ShowChoices(src) return 1 if(href_list["ready"]) @@ -122,7 +122,7 @@ LateChoices() return - // if(client.prefs.real_name in client.pastcharacters) //if character has been spawned before + // if(client?.prefs?.real_name in client.pastcharacters) //if character has been spawned before // to_chat(usr, "You have played that character before this round, please select a new one!") // return @@ -183,7 +183,7 @@ if(!ready && href_list["preference"]) if(client) - client.prefs.process_link(src, href_list) + client?.prefs?.process_link(src, href_list) else if(!href_list["late_join"]) new_player_panel() @@ -303,7 +303,7 @@ observer.client = client observer.set_ghost_appearance() if(observer.client && observer.client.prefs) - observer.real_name = observer.client.prefs.real_name + observer.real_name = observer.client?.prefs?.real_name observer.name = observer.real_name observer.client.init_verbs() observer.update_icon() @@ -346,11 +346,11 @@ if(jobban_isbanned(src,rank)) return JOB_UNAVAILABLE_BANNED if(job.whitelist_type) //whitelisting - if(job.whitelist_type == "roleplay" && !client.prefs.roleplayroles) + if(job.whitelist_type == "roleplay" && !client?.prefs?.roleplayroles) return JOB_UNAVAILABLE_WHITELIST - if(job.whitelist_type == "important" && !client.prefs.importantroles) + if(job.whitelist_type == "important" && !client?.prefs?.importantroles) return JOB_UNAVAILABLE_WHITELIST - if(job.whitelist_type == "silly" && !client.prefs.sillyroles) + if(job.whitelist_type == "silly" && !client?.prefs?.sillyroles) return JOB_UNAVAILABLE_WHITELIST if(QDELETED(src)) return JOB_UNAVAILABLE_GENERIC @@ -554,8 +554,8 @@ jobline += "[job.title] ([job.current_positions])" else jobline += "[job.title] ([job.current_positions])" - if(client && client.prefs && client.prefs.alt_titles_preferences[job.title]) - jobline += "