diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm
index 6dcb5f2534..1d09057617 100644
--- a/code/__HELPERS/roundend.dm
+++ b/code/__HELPERS/roundend.dm
@@ -402,7 +402,7 @@
for (var/i in GLOB.ai_list)
var/mob/living/silicon/ai/aiPlayer = i
if(aiPlayer.mind)
- parts += "[aiPlayer.name] (Played by: [aiPlayer.mind.key])'s laws [aiPlayer.stat != DEAD ? "at the end of the round" : "when it was deactivated"] were:"
+ parts += "[aiPlayer.name][aiPlayer.mind.hide_ckey ? "" : " (Played by: [aiPlayer.mind.key])"]'s laws [aiPlayer.stat != DEAD ? "at the end of the round" : "when it was deactivated"] were:"
parts += aiPlayer.laws.get_law_list(include_zeroth=TRUE)
parts += "Total law changes: [aiPlayer.law_change_counter]"
@@ -413,14 +413,14 @@
for(var/mob/living/silicon/robot/robo in aiPlayer.connected_robots)
borg_num--
if(robo.mind)
- robolist += "[robo.name] (Played by: [robo.mind.key])[robo.stat == DEAD ? " (Deactivated)" : ""][borg_num ?", ":""]
"
+ robolist += "[robo.name][robo.mind.hide_ckey ? "" : " (Played by: [robo.mind.key])"] [robo.stat == DEAD ? " (Deactivated)" : ""][borg_num ?", ":""]
"
parts += "[robolist]"
if(!borg_spacer)
borg_spacer = TRUE
for (var/mob/living/silicon/robot/robo in GLOB.silicon_mobs)
if (!robo.connected_ai && robo.mind)
- parts += "[borg_spacer?"
":""][robo.name] (Played by: [robo.mind.key]) [(robo.stat != DEAD)? "survived as an AI-less borg!" : "was unable to survive the rigors of being a cyborg without an AI."] Its laws were:"
+ parts += "[borg_spacer?"
":""][robo.name][robo.mind.hide_ckey ? "" : " (Played by: [robo.mind.key])"] [(robo.stat != DEAD)? "survived as an AI-less borg!" : "was unable to survive the rigors of being a cyborg without an AI."] Its laws were:"
if(robo) //How the hell do we lose robo between here and the world messages directly above this?
parts += robo.laws.get_law_list(include_zeroth=TRUE)
@@ -529,7 +529,7 @@
var/jobtext = ""
if(ply.assigned_role)
jobtext = " the [ply.assigned_role]"
- var/text = "[ply.key] was [ply.name][jobtext] and"
+ var/text = "[ply.hide_ckey ? "[ply.name][jobtext] " : "[ply.key] was [ply.name][jobtext] and "]"
if(ply.current)
if(ply.current.stat == DEAD)
text += " died"
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index cb99fdc5a3..0731cf8bf4 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -41,6 +41,8 @@
var/special_role
var/list/restricted_roles = list()
+ var/hide_ckey = FALSE //hide ckey from round-end report
+
var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button.
var/linglink
@@ -69,6 +71,7 @@
///What character we spawned in as- either at roundstart or latejoin, so we know for persistent scars if we ended as the same person or not
var/mob/original_character
+
/datum/mind/New(var/key)
skill_holder = new(src)
src.key = key
@@ -137,6 +140,8 @@
if(L.client?.prefs && L.client.prefs.auto_ooc && L.client.prefs.chat_toggles & CHAT_OOC)
DISABLE_BITFIELD(L.client.prefs.chat_toggles,CHAT_OOC)
+ hide_ckey = current.client?.prefs?.hide_ckey
+
SEND_SIGNAL(src, COMSIG_MIND_TRANSFER, new_character, old_character)
SEND_SIGNAL(new_character, COMSIG_MOB_ON_NEW_MIND)
@@ -780,6 +785,7 @@
if(!mind.name)
mind.name = real_name
mind.current = src
+ mind.hide_ckey = client?.prefs?.hide_ckey
/mob/living/carbon/mind_initialize()
..()
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index b077a0c8db..51e027522c 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -163,6 +163,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
)
var/custom_speech_verb = "default" //if your say_mod is to be something other than your races
var/custom_tongue = "default" //if your tongue is to be something other than your races
+ var/chosen_limb_id //body sprite selected to load for the users limbs, null means default, is sanitized when loaded
/// Security record note section
var/security_records
@@ -246,7 +247,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
/// Which of the 5 persistent scar slots we randomly roll to load for this round, if enabled. Actually rolled in [/datum/preferences/proc/load_character(slot)]
var/scars_index = 1
- var/chosen_limb_id //body sprite selected to load for the users limbs, null means default, is sanitized when loaded
+ var/hide_ckey = FALSE //pref for hiding if your ckey shows round-end or not
/datum/preferences/New(client/C)
parent = C
@@ -372,6 +373,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "[medical_records]"
else
dat += "[TextPreview(medical_records)]...
"
+ dat += "
Hide ckey: [hide_ckey ? "Enabled" : "Disabled"]
"
dat += ""
//Character Appearance
@@ -1448,6 +1450,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(!isnull(msg))
features["ooc_notes"] = msg
+ if("hide_ckey")
+ hide_ckey = !hide_ckey
+ if(user)
+ user.mind?.hide_ckey = hide_ckey
+
if("hair")
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference","#"+hair_color) as color|null
if(new_hair)
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index 55a594cf21..8591d77e50 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -515,7 +515,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["scars4"] >> scars_list["4"]
S["scars5"] >> scars_list["5"]
S["chosen_limb_id"] >> chosen_limb_id
-
+ S["hide_ckey"] >> hide_ckey //saved per-character
//Custom names
for(var/custom_name_id in GLOB.preferences_custom_names)
@@ -859,6 +859,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["joblessrole"] , joblessrole)
//Write prefs
WRITE_FILE(S["job_preferences"] , job_preferences)
+ WRITE_FILE(S["hide_ckey"] , hide_ckey)
//Quirks
WRITE_FILE(S["all_quirks"] , all_quirks)
@@ -874,6 +875,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["scars4"] , scars_list["4"])
WRITE_FILE(S["scars5"] , scars_list["5"])
+
//gear loadout
if(chosen_gear.len)
var/text_to_save = chosen_gear.Join("|")
diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm
index 31bfb5621f..0d4afd0915 100644
--- a/code/modules/mob/login.dm
+++ b/code/modules/mob/login.dm
@@ -50,6 +50,8 @@
var/datum/callback/CB = foo
CB.Invoke()
+ mind?.hide_ckey = client?.prefs?.hide_ckey
+
log_message("Client [key_name(src)] has taken ownership of mob [src]([src.type])", LOG_OWNERSHIP)
SEND_SIGNAL(src, COMSIG_MOB_CLIENT_LOGIN, client)