From d50ae43d7f14c5a8b9be1730820d8e36d385fff8 Mon Sep 17 00:00:00 2001 From: CitrusGender <31262308+CitrusGender@users.noreply.github.com> Date: Sun, 24 Jun 2018 14:55:13 -0400 Subject: [PATCH] Fixed cyborgs not getting their names at round start --- code/__HELPERS/unsorted.dm | 2 +- code/controllers/configuration/entries/game_options.dm | 2 -- code/controllers/subsystem/job.dm | 4 ++++ code/modules/jobs/job_types/silicon.dm | 3 +-- code/modules/mob/living/silicon/robot/robot.dm | 3 ++- code/modules/mob/transform_procs.dm | 3 +-- config/game_options.txt | 3 --- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index bb2cb98cd2..8ab5a48284 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -195,7 +195,7 @@ Turf and target are separate in case you want to teleport some distance from a t var/safety = 0 while(loop && safety < 5) - if(C && C.prefs.custom_names[role] && !safety) + if(C && C.prefs.custom_names[role] && !safety && (!jobban_isbanned(src, "appearance"))) newname = C.prefs.custom_names[role] else switch(role) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index ebf27324b9..5f2c583d59 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -170,8 +170,6 @@ config_entry_value = -1 min_val = -1 -/datum/config_entry/flag/rename_cyborg - /datum/config_entry/flag/ooc_during_round /datum/config_entry/flag/emojis diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index f72b7d1d6a..8c7a42e342 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -434,12 +434,16 @@ SUBSYSTEM_DEF(job) to_chat(M, "As this station was initially staffed with a [CONFIG_GET(flag/jobs_have_minimal_access) ? "full crew, only your job's necessities" : "skeleton crew, additional access may"] have been added to your ID card.") if(job && H) +<<<<<<< HEAD if(job.dresscodecompliant)// CIT CHANGE - dress code compliance equip_loadout(N, H) // CIT CHANGE - allows players to spawn with loadout items job.after_spawn(H, M, joined_late) equip_loadout(N, H, TRUE)//CIT CHANGE - makes players spawn with in-backpack loadout items properly. A little hacky but it works //handle_roundstart_items(H, M.ckey, H.mind.assigned_role, H.mind.special_role) //CIT CHANGE - makes donators spawn with their items. This can safely be commented out when all of the donator items are migrated to the loadout system +======= + job.after_spawn(H, M, joined_late) // note: this happens before the mob has a key! M will always have a client, H might not. +>>>>>>> 501fd35... Fixed cyborgs not getting their names at round start (#38675) return H diff --git a/code/modules/jobs/job_types/silicon.dm b/code/modules/jobs/job_types/silicon.dm index c53e034ddf..86246952f3 100644 --- a/code/modules/jobs/job_types/silicon.dm +++ b/code/modules/jobs/job_types/silicon.dm @@ -85,5 +85,4 @@ Cyborg return H.Robotize(FALSE, latejoin) /datum/job/cyborg/after_spawn(mob/living/silicon/robot/R, mob/M) - if(CONFIG_GET(flag/rename_cyborg)) //name can't be set in robot/New without the client - R.rename_self("cyborg", M.client) + R.rename_self("cyborg", M.client) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 40ec50d67e..6f076509d9 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -232,7 +232,8 @@ if(custom_name) changed_name = custom_name if(changed_name == "" && client) - changed_name = client.prefs.custom_names["cyborg"] + rename_self(src, client) + return //built in camera handled in proc if(!changed_name) changed_name = get_standard_name() diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index f1940be0e2..a3786221ff 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -381,8 +381,7 @@ else if(transfer_after) R.key = key - if (CONFIG_GET(flag/rename_cyborg)) - R.rename_self("cyborg") + R.rename_self("cyborg") if(R.mmi) R.mmi.name = "Man-Machine Interface: [real_name]" diff --git a/config/game_options.txt b/config/game_options.txt index 48e2dc5607..73c36990ab 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -16,9 +16,6 @@ REVIVAL_BRAIN_LIFE -1 ## RENAMING ### -## Uncomment to allow cyborgs to rename themselves at roundstart. Has no effect on roboticists renaming cyborgs the normal way. -#RENAME_CYBORG - ## OOC DURING ROUND ### ## Comment this out if you want OOC to be automatically disabled during the round, it will be enabled during the lobby and after the round end results. OOC_DURING_ROUND