mirror of
https://github.com/KabKebab/GS13.git
synced 2026-08-25 22:16:59 +01:00
Add null checks to client prefs checks
client.prefs. -> client?.prefs?.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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, "<span class='big bold'><font color = red>[html_encode(title)]</font color><BR>[html_encode(message)]</span><BR>")
|
||||
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
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
locked = !locked
|
||||
to_chat(usr, "<span class='notice'>Action button \"[name]\" [locked ? "" : "un"]locked.</span>")
|
||||
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, "<span class='notice'>Action button \"[name]\" [locked ? "" : "un"]locked.</span>")
|
||||
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, "<span class='notice'>Action button positions have been reset.</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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"])
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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, "<b>You are the [display_rank].</b>")
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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, "<span class='ghostalert'>[user] is requesting a pAI personality! Use the pAI button to submit yourself as one.</span>")
|
||||
addtimer(CALLBACK(src, .proc/spam_again), spam_delay)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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 += "</center>"
|
||||
|
||||
@@ -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)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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 ..()
|
||||
return ..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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."
|
||||
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."
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -787,8 +787,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
openToolTip(user,src,params,title = name,content = "[desc]<br><b>Force:</b> [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.
|
||||
|
||||
|
||||
@@ -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 = "<span class='name'>[owner] </span><span class='game say'>PDA Message</span> --> <span class='name'>[target_text]</span>: <span class='message'>[signal.format_message(TRUE)]</span>"
|
||||
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]")
|
||||
|
||||
@@ -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, "<span class='warning'>The user is buckled and can not be put into your [src].</span>")
|
||||
@@ -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("<span class='notice'>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]!"]</span>", \
|
||||
"<span class='notice'>[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)].)</span>", \
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
if(M.client)
|
||||
body += "| <A href='?_src_=holder;[HrefToken()];sendtoprison=[REF(M)]'>Prison</A> | "
|
||||
body += "\ <A href='?_src_=holder;[HrefToken()];sendbacktolobby=[REF(M)]'>Send back to Lobby</A> | "
|
||||
var/muted = M.client.prefs.muted
|
||||
var/muted = M.client?.prefs?.muted
|
||||
body += "<br><b>Mute: </b> "
|
||||
body += "\[<A href='?_src_=holder;[HrefToken()];mute=[M.ckey];mute_type=[MUTE_IC]'><font color='[(muted & MUTE_IC)?"red":"blue"]'>IC</font></a> | "
|
||||
body += "<A href='?_src_=holder;[HrefToken()];mute=[M.ckey];mute_type=[MUTE_OOC]'><font color='[(muted & MUTE_OOC)?"red":"blue"]'>OOC</font></a> | "
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)]")
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, "<span class='danger'>You cannot pray (muted).</span>")
|
||||
return
|
||||
if(src.client.handle_spam_prevention(msg,MUTE_PRAY))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1025,7 +1025,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Widescreen:</b> <a href='?_src_=prefs;preference=widescreenpref'>[widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]</a><br>"
|
||||
dat += "<b>Auto stand:</b> <a href='?_src_=prefs;preference=autostand'>[autostand ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<b>Screen Shake:</b> <a href='?_src_=prefs;preference=screenshake'>[(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]</a><br>"
|
||||
if (user && user.client && !user.client.prefs.screenshake==0)
|
||||
if (user && user.client && !user.client?.prefs?.screenshake==0)
|
||||
dat += "<b>Damage Screen Shake:</b> <a href='?_src_=prefs;preference=damagescreenshake'>[(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]</a><br>"
|
||||
|
||||
//GS13
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
return
|
||||
|
||||
/mob/dead/new_player/proc/new_player_panel()
|
||||
var/output = "<center><p>Welcome, <b>[client ? client.prefs.real_name : "Unknown User"]</b></p>"
|
||||
var/output = "<center><p>Welcome, <b>[client ? client?.prefs?.real_name : "Unknown User"]</b></p>"
|
||||
output += "<p><a href='byond://?src=[REF(src)];show_preferences=1'>Setup Character</a></p>"
|
||||
|
||||
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, "<span class='notice'>You have played that character before this round, please select a new one!</span>")
|
||||
// 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 += "<a class='[position_class]' style='display:block;width:170px' href='byond://?src=[REF(src)];SelectedJob=[job.title]'><font color='lime'><b>[job.title] ([job.current_positions])</b></font></a>"
|
||||
else
|
||||
jobline += "<a class='[position_class]' style='display:block;width:170px' href='byond://?src=[REF(src)];SelectedJob=[job.title]'>[job.title] ([job.current_positions])</a>"
|
||||
if(client && client.prefs && client.prefs.alt_titles_preferences[job.title])
|
||||
jobline += "<br><span style='color:#BBBBBB; font-style: italic;'>(as [client.prefs.alt_titles_preferences[job.title]])</span>"
|
||||
if(client && client.prefs && client?.prefs?.alt_titles_preferences[job.title])
|
||||
jobline += "<br><span style='color:#BBBBBB; font-style: italic;'>(as [client?.prefs?.alt_titles_preferences[job.title]])</span>"
|
||||
dat += jobline
|
||||
categorizedJobs[jobcat]["jobs"] -= job
|
||||
|
||||
@@ -588,9 +588,9 @@
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(frn)
|
||||
client.prefs.random_character()
|
||||
client.prefs.real_name = client.prefs.pref_species.random_name(gender,1)
|
||||
client.prefs.copy_to(H)
|
||||
client?.prefs?.random_character()
|
||||
client?.prefs?.real_name = client?.prefs?.pref_species.random_name(gender,1)
|
||||
client?.prefs?.copy_to(H)
|
||||
|
||||
H.dna.update_dna_identity()
|
||||
if(mind)
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
if(!. || !client)
|
||||
return FALSE
|
||||
|
||||
ghost_accs = client.prefs.ghost_accs
|
||||
ghost_others = client.prefs.ghost_others
|
||||
ghost_accs = client?.prefs?.ghost_accs
|
||||
ghost_others = client?.prefs?.ghost_others
|
||||
var/preferred_form = null
|
||||
|
||||
if(IsAdminGhost(src))
|
||||
has_unlimited_silicon_privilege = 1
|
||||
|
||||
if(client.prefs.unlock_content)
|
||||
preferred_form = client.prefs.ghost_form
|
||||
ghost_orbit = client.prefs.ghost_orbit
|
||||
if(client?.prefs?.unlock_content)
|
||||
preferred_form = client?.prefs?.ghost_form
|
||||
ghost_orbit = client?.prefs?.ghost_orbit
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if (isturf(T))
|
||||
|
||||
@@ -175,8 +175,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
/mob/dead/observer/update_icon(new_form)
|
||||
. = ..()
|
||||
if(client) //We update our preferences in case they changed right before update_icon was called.
|
||||
ghost_accs = client.prefs.ghost_accs
|
||||
ghost_others = client.prefs.ghost_others
|
||||
ghost_accs = client?.prefs?.ghost_accs
|
||||
ghost_others = client?.prefs?.ghost_others
|
||||
|
||||
if(hair_overlay)
|
||||
cut_overlay(hair_overlay)
|
||||
@@ -268,9 +268,9 @@ Works together with spawning an observer, noted above.
|
||||
var/mob/dead/observer/ghost = new(get_turf(src), src) // Transfer safety to observer spawning proc.
|
||||
SStgui.on_transfer(src, ghost) // Transfer NanoUIs.
|
||||
ghost.can_reenter_corpse = can_reenter_corpse
|
||||
if (client && client.prefs && client.prefs.auto_ooc)
|
||||
if (!(client.prefs.chat_toggles & CHAT_OOC))
|
||||
client.prefs.chat_toggles ^= CHAT_OOC
|
||||
if (client && client.prefs && client?.prefs?.auto_ooc)
|
||||
if (!(client?.prefs?.chat_toggles & CHAT_OOC))
|
||||
client?.prefs?.chat_toggles ^= CHAT_OOC
|
||||
transfer_ckey(ghost, FALSE)
|
||||
ghost.AddElement(/datum/element/ghost_role_eligibility,penalize) // technically already run earlier, but this adds the penalty
|
||||
// needs to be done AFTER the ckey transfer, too
|
||||
@@ -378,8 +378,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(source)
|
||||
var/obj/screen/alert/A = throw_alert("[REF(source)]_notify_cloning", /obj/screen/alert/notify_cloning)
|
||||
if(A)
|
||||
if(client && client.prefs && client.prefs.UI_style)
|
||||
A.icon = ui_style2icon(client.prefs.UI_style)
|
||||
if(client && client.prefs && client?.prefs?.UI_style)
|
||||
A.icon = ui_style2icon(client?.prefs?.UI_style)
|
||||
A.desc = message
|
||||
var/old_layer = source.layer
|
||||
var/old_plane = source.plane
|
||||
@@ -506,7 +506,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "View Range"
|
||||
set desc = "Change your view range."
|
||||
|
||||
var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
|
||||
var/max_view = client?.prefs?.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
|
||||
if(client.view == CONFIG_GET(string/default_view))
|
||||
var/list/views = list()
|
||||
for(var/i in 7 to max_view)
|
||||
@@ -520,7 +520,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
/mob/dead/observer/verb/add_view_range(input as num)
|
||||
set name = "Add View Range"
|
||||
set hidden = TRUE
|
||||
var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
|
||||
var/max_view = client?.prefs?.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
|
||||
if(input)
|
||||
client.rescale_view(input, 15, (max_view*2)+1)
|
||||
|
||||
@@ -573,7 +573,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/dead/observer/update_sight()
|
||||
if(client)
|
||||
ghost_others = client.prefs.ghost_others //A quick update just in case this setting was changed right before calling the proc
|
||||
ghost_others = client?.prefs?.ghost_others //A quick update just in case this setting was changed right before calling the proc
|
||||
|
||||
if (!ghostvision)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
@@ -601,11 +601,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
client.images -= GLOB.ghost_images_default
|
||||
if(GHOST_OTHERS_SIMPLE)
|
||||
client.images -= GLOB.ghost_images_simple
|
||||
lastsetting = client.prefs.ghost_others
|
||||
lastsetting = client?.prefs?.ghost_others
|
||||
if(!ghostvision)
|
||||
return
|
||||
if(client.prefs.ghost_others != GHOST_OTHERS_THEIR_SETTING)
|
||||
switch(client.prefs.ghost_others)
|
||||
if(client?.prefs?.ghost_others != GHOST_OTHERS_THEIR_SETTING)
|
||||
switch(client?.prefs?.ghost_others)
|
||||
if(GHOST_OTHERS_DEFAULT_SPRITE)
|
||||
client.images |= (GLOB.ghost_images_default-ghostimage_default)
|
||||
if(GHOST_OTHERS_SIMPLE)
|
||||
@@ -741,23 +741,23 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
set_ghost_appearance()
|
||||
if(client && client.prefs)
|
||||
deadchat_name = client.prefs.real_name
|
||||
deadchat_name = client?.prefs?.real_name
|
||||
|
||||
/mob/dead/observer/proc/set_ghost_appearance()
|
||||
if((!client) || (!client.prefs))
|
||||
return
|
||||
|
||||
if(client.prefs.be_random_name)
|
||||
client.prefs.real_name = random_unique_name(gender)
|
||||
if(client.prefs.be_random_body)
|
||||
client.prefs.random_character(gender)
|
||||
if(client?.prefs?.be_random_name)
|
||||
client?.prefs?.real_name = random_unique_name(gender)
|
||||
if(client?.prefs?.be_random_body)
|
||||
client?.prefs?.random_character(gender)
|
||||
|
||||
if(HAIR in client.prefs.pref_species.species_traits)
|
||||
hair_style = client.prefs.hair_style
|
||||
hair_color = brighten_color(client.prefs.hair_color)
|
||||
if(FACEHAIR in client.prefs.pref_species.species_traits)
|
||||
facial_hair_style = client.prefs.facial_hair_style
|
||||
facial_hair_color = brighten_color(client.prefs.facial_hair_color)
|
||||
if(HAIR in client?.prefs?.pref_species.species_traits)
|
||||
hair_style = client?.prefs?.hair_style
|
||||
hair_color = brighten_color(client?.prefs?.hair_color)
|
||||
if(FACEHAIR in client?.prefs?.pref_species.species_traits)
|
||||
facial_hair_style = client?.prefs?.facial_hair_style
|
||||
facial_hair_color = brighten_color(client?.prefs?.facial_hair_color)
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
to_follow = V.source
|
||||
var/link = FOLLOW_LINK(src, to_follow)
|
||||
// Create map text prior to modifying message for goonchat
|
||||
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)
|
||||
// Recompose the message, because it's scrambled by default
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode, FALSE, source)
|
||||
|
||||
@@ -313,7 +313,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
C.canbearoused = FALSE
|
||||
else
|
||||
if(C.client)
|
||||
C.canbearoused = C.client.prefs.arousable
|
||||
C.canbearoused = C.client?.prefs?.arousable
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(NOGENITALS in H.dna.species.species_traits)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(!H.dna.features["moth_wings"])
|
||||
H.dna.features["moth_wings"] = "[(H.client && H.client.prefs && LAZYLEN(H.client.prefs.features) && H.client.prefs.features["moth_wings"]) ? H.client.prefs.features["moth_wings"] : "Plain"]"
|
||||
H.dna.features["moth_wings"] = "[(H.client && H.client.prefs && LAZYLEN(H.client?.prefs?.features) && H.client?.prefs?.features["moth_wings"]) ? H.client?.prefs?.features["moth_wings"] : "Plain"]"
|
||||
handle_mutant_bodyparts(H)
|
||||
|
||||
/datum/species/moth/random_name(gender,unique,lastname)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
log_whisper("[src.name]/[src.key] : [message]")
|
||||
|
||||
if (src.client)
|
||||
if (src.client.prefs.muted & MUTE_IC)
|
||||
if (src.client?.prefs?.muted & MUTE_IC)
|
||||
to_chat(src, "<span class='danger'>You cannot whisper (muted).</span>")
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
var/list/listening_dead = list()
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.stat == DEAD && M.client && ((M.client.prefs.chat_toggles & CHAT_GHOSTWHISPER) || (get_dist(M, src) <= 7)))
|
||||
if(M.stat == DEAD && M.client && ((M.client?.prefs?.chat_toggles & CHAT_GHOSTWHISPER) || (get_dist(M, src) <= 7)))
|
||||
listening_dead |= M
|
||||
|
||||
var/list/listening = get_hearers_in_view(1, src)
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
return FALSE
|
||||
else if(QDELETED(user))
|
||||
return FALSE
|
||||
else if(user.client && user.client.prefs.muted & MUTE_IC)
|
||||
else if(user.client && user.client?.prefs?.muted & MUTE_IC)
|
||||
to_chat(user, "You cannot send IC messages (muted).")
|
||||
return FALSE
|
||||
else if(!params)
|
||||
|
||||
@@ -1105,7 +1105,7 @@
|
||||
if(client)
|
||||
client.move_delay = world.time + movement_delay()
|
||||
lying_prev = lying
|
||||
if(canmove && !intentionalresting && iscarbon(src) && client && client.prefs && client.prefs.autostand)//CIT CHANGE - adds autostanding as a preference
|
||||
if(canmove && !intentionalresting && iscarbon(src) && client && client.prefs && client?.prefs?.autostand)//CIT CHANGE - adds autostanding as a preference
|
||||
addtimer(CALLBACK(src, .proc/resist_a_rest, TRUE), 0) //CIT CHANGE - ditto
|
||||
return canmove
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
deaf_message = "<span class='notice'>You can't hear yourself!</span>"
|
||||
deaf_type = 2 // Since you should be able to hear yourself without looking
|
||||
// Create map text prior to modifying message for goonchat
|
||||
if (client?.prefs.chat_on_map && stat != UNCONSCIOUS && (client.prefs.see_chat_non_mob || ismob(speaker)) && can_hear())
|
||||
if (client?.prefs.chat_on_map && stat != UNCONSCIOUS && (client?.prefs?.see_chat_non_mob || ismob(speaker)) && can_hear())
|
||||
create_chat_message(speaker, message_language, raw_message, spans, message_mode)
|
||||
if (client?.prefs.radiosounds && stat != UNCONSCIOUS && can_hear() && radio_freq)
|
||||
playsound_local(src,'sound/voice/radio.ogg', 30, 0)
|
||||
@@ -281,9 +281,9 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
if(!M.client || !client) //client is so that ghosts don't have to listen to mice
|
||||
continue
|
||||
if(get_dist(M, source) > 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
|
||||
if(eavesdropping_modes[message_mode] && !(M.client?.prefs?.chat_toggles & CHAT_GHOSTWHISPER)) //they're whispering and we have hearing whispers at any range off
|
||||
continue
|
||||
if(!(M.client.prefs.chat_toggles & CHAT_GHOSTEARS)) //they're talking normally and we have hearing at any range off
|
||||
if(!(M.client?.prefs?.chat_toggles & CHAT_GHOSTEARS)) //they're talking normally and we have hearing at any range off
|
||||
continue
|
||||
listening |= M
|
||||
the_dead[M] = TRUE
|
||||
@@ -306,7 +306,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
//speech bubble
|
||||
var/list/speech_bubble_recipients = list()
|
||||
for(var/mob/M in listening)
|
||||
if(M.client && !M.client.prefs.chat_on_map)
|
||||
if(M.client && !M.client?.prefs?.chat_on_map)
|
||||
speech_bubble_recipients.Add(M.client)
|
||||
var/image/I = image('icons/mob/talk.dmi', src, "[bubble_type][say_test(message)]", FLY_LAYER)
|
||||
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
@@ -321,7 +321,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
|
||||
/mob/living/proc/can_speak_basic(message, ignore_spam = FALSE) //Check BEFORE handling of xeno and ling channels
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
if(client?.prefs?.muted & MUTE_IC)
|
||||
to_chat(src, "<span class='danger'>You cannot speak in IC (muted).</span>")
|
||||
return 0
|
||||
if(!ignore_spam && client.handle_spam_prevention(message,MUTE_IC))
|
||||
|
||||
@@ -830,7 +830,7 @@
|
||||
jobpart = "Unknown"
|
||||
|
||||
var/rendered = "<i><span class='game say'>[start]<span class='name'>[hrefpart][namepart] ([jobpart])</a> </span><span class='message'>[treated_message]</span></span></i>"
|
||||
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)
|
||||
|
||||
show_message(rendered, MSG_AUDIBLE)
|
||||
|
||||
@@ -151,7 +151,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.client && M.can_hear() && (M.client?.prefs?.toggles & SOUND_ANNOUNCEMENTS))
|
||||
var/turf/T = get_turf(M)
|
||||
if(T.z == z_level)
|
||||
SEND_SOUND(M, voice)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
create_mob_hud()
|
||||
if(hud_used)
|
||||
hud_used.show_hud(hud_used.hud_version)
|
||||
hud_used.update_ui_style(ui_style2icon(client.prefs.UI_style))
|
||||
hud_used.update_ui_style(ui_style2icon(client?.prefs?.UI_style))
|
||||
|
||||
next_move = 1
|
||||
|
||||
|
||||
@@ -488,11 +488,11 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
if(!ckey)
|
||||
return
|
||||
SEND_SIGNAL(new_mob, COMSIG_MOB_PRE_PLAYER_CHANGE, new_mob, src)
|
||||
if (client && client.prefs && client.prefs.auto_ooc)
|
||||
if (client.prefs.chat_toggles & CHAT_OOC && isliving(new_mob))
|
||||
client.prefs.chat_toggles ^= CHAT_OOC
|
||||
if (!(client.prefs.chat_toggles & CHAT_OOC) && isdead(new_mob))
|
||||
client.prefs.chat_toggles ^= CHAT_OOC
|
||||
if (client && client.prefs && client?.prefs?.auto_ooc)
|
||||
if (client?.prefs?.chat_toggles & CHAT_OOC && isliving(new_mob))
|
||||
client?.prefs?.chat_toggles ^= CHAT_OOC
|
||||
if (!(client?.prefs?.chat_toggles & CHAT_OOC) && isdead(new_mob))
|
||||
client?.prefs?.chat_toggles ^= CHAT_OOC
|
||||
new_mob.ckey = ckey
|
||||
new_mob.client?.init_verbs()
|
||||
if(send_signal)
|
||||
|
||||
@@ -401,8 +401,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
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(O.client.prefs && O.client?.prefs?.UI_style)
|
||||
A.icon = ui_style2icon(O.client?.prefs?.UI_style)
|
||||
A.desc = message
|
||||
A.action = action
|
||||
A.target = source
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
|
||||
if (src.client)
|
||||
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
||||
if(src.client?.prefs?.muted & MUTE_DEADCHAT)
|
||||
to_chat(src, "<span class='danger'>You cannot talk in deadchat (muted).</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ proc/get_top_level_mob(var/mob/S)
|
||||
if(jobban_isbanned(user, "emote"))
|
||||
to_chat(user, "You cannot send subtle emotes (banned).")
|
||||
return FALSE
|
||||
else if(user.client && user.client.prefs.muted & MUTE_IC)
|
||||
else if(user.client && user.client?.prefs?.muted & MUTE_IC)
|
||||
to_chat(user, "You cannot send IC messages (muted).")
|
||||
return FALSE
|
||||
else if(!params)
|
||||
@@ -69,7 +69,7 @@ proc/get_top_level_mob(var/mob/S)
|
||||
if(!M.client || isnewplayer(M))
|
||||
continue
|
||||
var/T = get_turf(src)
|
||||
if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T, null)))
|
||||
if(M.stat == DEAD && M.client && (M.client?.prefs?.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T, null)))
|
||||
M.show_message(message)
|
||||
|
||||
if(emote_type == EMOTE_AUDIBLE)
|
||||
@@ -100,7 +100,7 @@ proc/get_top_level_mob(var/mob/S)
|
||||
if(jobban_isbanned(user, "emote"))
|
||||
to_chat(user, "You cannot send subtle emotes (banned).")
|
||||
return FALSE
|
||||
else if(user.client && user.client.prefs.muted & MUTE_IC)
|
||||
else if(user.client && user.client?.prefs?.muted & MUTE_IC)
|
||||
to_chat(user, "You cannot send IC messages (muted).")
|
||||
return FALSE
|
||||
else if(!params)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
// Remove titlebar and resize handles for a fancy window
|
||||
var/have_title_bar
|
||||
if(user.client.prefs.tgui_fancy)
|
||||
if(user.client?.prefs?.tgui_fancy)
|
||||
have_title_bar = "titlebar=0;can_resize=0;"
|
||||
else
|
||||
have_title_bar = "titlebar=1;can_resize=1;"
|
||||
@@ -219,8 +219,8 @@
|
||||
"screen" = ui_screen,
|
||||
"style" = style,
|
||||
"interface" = interface,
|
||||
"fancy" = user.client.prefs.tgui_fancy,
|
||||
"locked" = user.client.prefs.tgui_lock && !custom_browser_id,
|
||||
"fancy" = user.client?.prefs?.tgui_fancy,
|
||||
"locked" = user.client?.prefs?.tgui_lock && !custom_browser_id,
|
||||
"observer" = isobserver(user),
|
||||
"window" = window_id,
|
||||
// NOTE: Intentional \ref usage; tgui datums can't/shouldn't
|
||||
@@ -269,9 +269,9 @@
|
||||
if("tgui:link")
|
||||
user << link(params["url"])
|
||||
if("tgui:fancy")
|
||||
user.client.prefs.tgui_fancy = TRUE
|
||||
user.client?.prefs?.tgui_fancy = TRUE
|
||||
if("tgui:nofrills")
|
||||
user.client.prefs.tgui_fancy = FALSE
|
||||
user.client?.prefs?.tgui_fancy = FALSE
|
||||
else
|
||||
update_status(push = FALSE) // Update the window state.
|
||||
if(src_object.ui_act(action, params, src, state)) // Call ui_act() on the src_object.
|
||||
|
||||
@@ -108,8 +108,8 @@ Notes:
|
||||
/proc/openToolTip(mob/user = null, atom/movable/tip_src = null, params = null,title = "",content = "",theme = "")
|
||||
if(istype(user))
|
||||
if(user.client && user.client.tooltips)
|
||||
if(!theme && user.client.prefs && user.client.prefs.UI_style)
|
||||
theme = lowertext(user.client.prefs.UI_style)
|
||||
if(!theme && user.client.prefs && user.client?.prefs?.UI_style)
|
||||
theme = lowertext(user.client?.prefs?.UI_style)
|
||||
if(!theme)
|
||||
theme = "default"
|
||||
user.client.tooltips.show(tip_src, params,title,content,theme)
|
||||
|
||||
Reference in New Issue
Block a user