From 9c6da0cf45d2d7ab832a3de0331fc899e51f72f4 Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Sun, 19 Nov 2023 06:40:38 +0100
Subject: [PATCH] [MIRROR] Nukie Aliases and Some Hairspray [MDB IGNORE]
(#25097)
* Nukie Aliases and Some Hairspray (#79653)
## About The Pull Request
Nuclear operatives now receive an alias for their first name, instead of
a default human name. This alias is randomly selected, or can be set in
your name preferences.
![image](https://github.com/tgstation/tgstation/assets/28870487/2584b625-4668-4738-a662-8205476fac2f)
This does not affect Operative Leaders selecting the team's last name.
This means that **operative names are now "[Alias chosen by player]
[Team name chosen by leader]".**
There is a list of default aliases, in case no alias has been selected.
I randomly came up with a bunch of stuff from the top of my head and put
it in a text file. If you think of something better, choose it yourself!
**OH, ALSO:**
There's some hair dye in the Firebase dorms now. Useful if you want to
further differentiate between your Operative/Crew characters, or just
look pretty.
## Why It's Good For The Game
No longer shall nukies be "your character but with a different name".
Now you can give yourself a bit more identity instead of just a random
name.
More customization options means more opportunities for people doing
interesting stuff, and to branch away from the beaten path of boring
meta strats.
## Changelog
:cl: Rhials
add: Nuclear Operatives, in an attempt to appeal to the more "tacticool"
members of their cause, have begun using callsigns to designate
themselves. Check your preferences to set your Operative Alias!
qol: At the request of the more vain members of the cause, hair dye has
been added to the Operative Firebase dorms.
/:cl:
* Nukie Aliases and Some Hairspray
---------
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
---
_maps/templates/lazy_templates/nukie_base.dmm | 8 ++
code/_globalvars/lists/names.dm | 1 +
code/modules/antagonists/nukeop/nukeop.dm | 25 ++--
code/modules/client/preferences/names.dm | 22 +++
.../mob/living/carbon/human/_species.dm | 8 +-
strings/names/operative_alias.txt | 126 ++++++++++++++++++
.../character_preferences/operative_alias.tsx | 6 +
7 files changed, 177 insertions(+), 19 deletions(-)
create mode 100644 strings/names/operative_alias.txt
create mode 100644 tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/operative_alias.tsx
diff --git a/_maps/templates/lazy_templates/nukie_base.dmm b/_maps/templates/lazy_templates/nukie_base.dmm
index d6e8dcfc607..ac3de4c4b26 100644
--- a/_maps/templates/lazy_templates/nukie_base.dmm
+++ b/_maps/templates/lazy_templates/nukie_base.dmm
@@ -320,6 +320,10 @@
"dI" = (
/obj/structure/dresser,
/obj/structure/noticeboard/directional/south,
+/obj/item/dyespray{
+ pixel_x = -3;
+ pixel_y = 13
+ },
/turf/open/floor/iron/smooth_half{
dir = 1
},
@@ -852,6 +856,10 @@
"jq" = (
/obj/structure/dresser,
/obj/structure/noticeboard/directional/north,
+/obj/item/dyespray{
+ pixel_x = -2;
+ pixel_y = 15
+ },
/turf/open/floor/iron/smooth_half{
dir = 1
},
diff --git a/code/_globalvars/lists/names.dm b/code/_globalvars/lists/names.dm
index 52af61db88a..bc195bcf5f4 100644
--- a/code/_globalvars/lists/names.dm
+++ b/code/_globalvars/lists/names.dm
@@ -28,6 +28,7 @@ GLOBAL_LIST_INIT(syndicate_monkey_names, world.file2list("strings/names/syndicat
GLOBAL_LIST_INIT(guardian_first_names, world.file2list("strings/names/guardian_descriptions.txt"))
GLOBAL_LIST_INIT(guardian_tech_surnames, world.file2list("strings/names/guardian_gamepieces.txt"))
GLOBAL_LIST_INIT(guardian_fantasy_surnames, world.file2list("strings/names/guardian_tarot.txt"))
+GLOBAL_LIST_INIT(operative_aliases, world.file2list("strings/names/operative_alias.txt"))
GLOBAL_LIST_INIT(verbs, world.file2list("strings/names/verbs.txt"))
GLOBAL_LIST_INIT(ing_verbs, world.file2list("strings/names/ing_verbs.txt"))
diff --git a/code/modules/antagonists/nukeop/nukeop.dm b/code/modules/antagonists/nukeop/nukeop.dm
index e2490d1a2b6..c9ad46b1415 100644
--- a/code/modules/antagonists/nukeop/nukeop.dm
+++ b/code/modules/antagonists/nukeop/nukeop.dm
@@ -109,10 +109,11 @@
/datum/antagonist/nukeop/proc/give_alias()
if(nuke_team?.syndicate_name)
- var/mob/living/carbon/human/H = owner.current
- if(istype(H)) // Reinforcements get a real name
- var/chosen_name = H.dna.species.random_name(H.gender,0,nuke_team.syndicate_name)
- H.fully_replace_character_name(H.real_name,chosen_name)
+ var/mob/living/carbon/human/human_to_rename = owner.current
+ if(istype(human_to_rename)) // Reinforcements get a real name
+ var/first_name = owner.current.client?.prefs?.read_preference(/datum/preference/name/operative_alias) || pick(GLOB.operative_aliases)
+ var/chosen_name = "[first_name] [nuke_team.syndicate_name]"
+ human_to_rename.fully_replace_character_name(human_to_rename.real_name, chosen_name)
else
var/number = 1
number = nuke_team.members.Find(owner)
@@ -264,13 +265,6 @@
H.put_in_hands(nuke_code_paper, TRUE)
H.update_icons()
-/datum/antagonist/nukeop/leader/give_alias()
- title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")
- if(nuke_team?.syndicate_name)
- owner.current.real_name = "[nuke_team.syndicate_name] [title]"
- else
- owner.current.real_name = "Syndicate [title]"
-
/datum/antagonist/nukeop/leader/greet()
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0, use_reverb = FALSE)
to_chat(owner, "You are the Syndicate [title] for this mission. You are responsible for guiding the team and your ID is the only one who can open the launch bay doors.")
@@ -298,11 +292,12 @@
name = "[syndicate_name] Team"
for(var/I in members)
var/datum/mind/synd_mind = I
- var/mob/living/carbon/human/H = synd_mind.current
- if(!istype(H))
+ var/mob/living/carbon/human/human_to_rename = synd_mind.current
+ if(!istype(human_to_rename))
continue
- var/chosen_name = H.dna.species.random_name(H.gender,0,syndicate_name)
- H.fully_replace_character_name(H.real_name,chosen_name)
+ var/first_name = human_to_rename.client?.prefs?.read_preference(/datum/preference/name/operative_alias) || pick(GLOB.operative_aliases)
+ var/chosen_name = "[first_name] [syndicate_name]"
+ human_to_rename.fully_replace_character_name(human_to_rename.real_name, chosen_name)
/datum/antagonist/nukeop/leader/proc/ask_name()
var/randomname = pick(GLOB.last_names)
diff --git a/code/modules/client/preferences/names.dm b/code/modules/client/preferences/names.dm
index 2199d6541d9..823de1b4173 100644
--- a/code/modules/client/preferences/names.dm
+++ b/code/modules/client/preferences/names.dm
@@ -155,3 +155,25 @@
/datum/preference/name/bible/create_default_value()
return DEFAULT_BIBLE
+
+/// The first name given to nuclear operative antagonists. The last name will be chosen by the team leader.
+/datum/preference/name/operative_alias
+ savefile_key = "operative_alias"
+ allow_numbers = TRUE //You can get a little wacky with your alias nobody will judge you
+ explanation = "Operative Alias"
+ group = "antagonists"
+
+/datum/preference/name/operative_alias/create_default_value()
+ return pick(GLOB.operative_aliases)
+
+/datum/preference/name/operative_alias/is_accessible(datum/preferences/preferences)
+ . = ..()
+ if(!.)
+ return FALSE
+
+ // If one of the roles is ticked in the antag prefs menu, this option will show.
+ var/static/list/ops_roles = list(ROLE_OPERATIVE, ROLE_LONE_OPERATIVE, ROLE_OPERATIVE_MIDROUND, ROLE_CLOWN_OPERATIVE)
+ if(length(ops_roles & preferences.be_special))
+ return TRUE
+
+ return FALSE
diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm
index b4e56f2bfb4..b847b7a73da 100644
--- a/code/modules/mob/living/carbon/human/_species.dm
+++ b/code/modules/mob/living/carbon/human/_species.dm
@@ -261,9 +261,9 @@ GLOBAL_LIST_EMPTY(features_by_species)
* Arguments:
* * gender - The gender that the name should adhere to. Use MALE for male names, use anything else for female names.
* * unique - If true, ensures that this new name is not a duplicate of anyone else's name currently on the station.
- * * lastname - Does this species' naming system adhere to the last name system? Set to false if it doesn't.
+ * * last_name - Do we use a given last name or pick a random new one?
*/
-/datum/species/proc/random_name(gender,unique,lastname)
+/datum/species/proc/random_name(gender, unique, last_name)
if(unique)
return random_unique_name(gender)
@@ -273,8 +273,8 @@ GLOBAL_LIST_EMPTY(features_by_species)
else
randname = pick(GLOB.first_names_female)
- if(lastname)
- randname += " [lastname]"
+ if(last_name)
+ randname += " [last_name]"
else
randname += " [pick(GLOB.last_names)]"
diff --git a/strings/names/operative_alias.txt b/strings/names/operative_alias.txt
new file mode 100644
index 00000000000..582851fc07c
--- /dev/null
+++ b/strings/names/operative_alias.txt
@@ -0,0 +1,126 @@
+Agent
+Agony
+Alias
+Alpha
+Argo
+Barker
+Batter
+Beef
+Beetle
+Bomber
+Bonsai
+Boss
+Boston
+Bovine
+Bravo
+Caboose
+Callsign
+Carmack
+Carolina
+Carp
+Chains
+Charlie
+Church
+Collar
+Comedian
+Crash
+Creeper
+Cretin
+Criminal
+Cyborg
+Dallas
+Delta
+Doc
+Donk
+Drowning
+Dude
+Dwarf
+Echo
+Emo
+Eva
+Finger
+Fish
+Fitzgerald
+Flash
+Flyboy
+Foxtrot
+Freak
+Freeman
+Fugitive
+Gaffer
+Giant
+Goalie
+Golf
+Gorbino
+Green
+Grime
+Guy
+Hologram
+Hotel
+Houston
+Indica
+Ion
+Jacket
+Jeremy
+Jones
+Kars
+Legion
+Librarian
+Lightbringer
+Lighter
+Lightning
+Looper
+Lover
+Marksman
+Maurauder
+Misty
+Musketeer
+Mycus
+Neutron
+Nightmare
+Peacekeeper
+Peddler
+Point
+Pooh
+Private
+Psycho
+Pyro
+Red
+Revenant
+Rocker
+Ronin
+Sack
+Samson
+Sarge
+Scorch
+Scout
+Scream
+Scum
+Serenity
+Shade
+Shadow
+Shark
+Shocker
+Shooter
+Shrieker
+Shrike
+Silas
+Silence
+Simmons
+Slider
+Smoke
+Snake
+Stalker
+Superfly
+Suspect
+Swiper
+Tank
+Telecrystal
+Tex
+Thirteen
+Twister
+Unusual
+Vixen
+White
+Wilson
+Winters
diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/operative_alias.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/operative_alias.tsx
new file mode 100644
index 00000000000..a71f2c630f1
--- /dev/null
+++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/operative_alias.tsx
@@ -0,0 +1,6 @@
+import { Feature, FeatureShortTextInput } from '../base';
+
+export const operative_alias: Feature = {
+ name: 'Operative Alias',
+ component: FeatureShortTextInput,
+};