From b2666019bc9e98b697b599467a33b293e447a599 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Sat, 27 Aug 2022 18:30:41 -0700 Subject: [PATCH 1/2] allow people to have dupe names (??) --- code/__HELPERS/unsorted.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 428784e953..8430547c7e 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -173,10 +173,10 @@ Turf and target are separate in case you want to teleport some distance from a t var/banned = jobban_isbanned(src, "appearance") - while(loop && safety < 5) - if(C && C.prefs.custom_names[role] && !safety && !banned) - newname = C.prefs.custom_names[role] - else + if(C && C.prefs.custom_names[role] && !safety && !banned) + newname = C.prefs.custom_names[role] + else + while(loop && safety < 5) switch(role) if("human") newname = random_unique_name(gender) From 7cc55cbc97c0584fe42328a88eb809d6149a1414 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Sat, 27 Aug 2022 18:33:42 -0700 Subject: [PATCH 2/2] redundant safety check --- code/__HELPERS/unsorted.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 8430547c7e..cb2cfafa53 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -173,7 +173,7 @@ Turf and target are separate in case you want to teleport some distance from a t var/banned = jobban_isbanned(src, "appearance") - if(C && C.prefs.custom_names[role] && !safety && !banned) + if(C?.prefs?.custom_names[role] && !banned) newname = C.prefs.custom_names[role] else while(loop && safety < 5)