mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Leaving agent card forge name blank randomizes it (#45805)
About The Pull Request Leaving the forge name text field blank, or it being invalid for another reason, will randomize it. Why It's Good For The Game Leave blank to stop the 30 second thinking about what realistic name to give yourself. QoL change. Changelog cl add: Agents cards randomly assign you a name if you leave the name field blank. /cl
This commit is contained in:
@@ -4,6 +4,7 @@ GLOBAL_LIST_INIT(wizard_second, world.file2list("strings/names/wizardsecond.txt"
|
||||
GLOBAL_LIST_INIT(ninja_titles, world.file2list("strings/names/ninjatitle.txt"))
|
||||
GLOBAL_LIST_INIT(ninja_names, world.file2list("strings/names/ninjaname.txt"))
|
||||
GLOBAL_LIST_INIT(commando_names, world.file2list("strings/names/death_commando.txt"))
|
||||
GLOBAL_LIST_INIT(first_names, world.file2list("strings/names/first.txt"))
|
||||
GLOBAL_LIST_INIT(first_names_male, world.file2list("strings/names/first_male.txt"))
|
||||
GLOBAL_LIST_INIT(first_names_female, world.file2list("strings/names/first_female.txt"))
|
||||
GLOBAL_LIST_INIT(last_names, world.file2list("strings/names/last.txt"))
|
||||
|
||||
@@ -371,10 +371,28 @@ update_label()
|
||||
if(user.incapacitated())
|
||||
return
|
||||
if(popup_input == "Forge")
|
||||
var/t = copytext(sanitize_name(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26)
|
||||
if(!t)
|
||||
var/input_text = input(user, "What name would you like to put on this card? Leave blank to randomise.", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null
|
||||
|
||||
if (isnull(input_text))
|
||||
return
|
||||
registered_name = t
|
||||
|
||||
var/t = copytext(sanitize(input_text), 1, 26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/dead/new_player/prefrences.dm
|
||||
if (ishuman(user))
|
||||
var/mob/living/carbon/human/human_agent = user
|
||||
|
||||
// Invalid/blank names give a randomly generated one.
|
||||
if (human_agent.gender == "male")
|
||||
registered_name = "[pick(GLOB.first_names_male)] [pick(GLOB.last_names)]"
|
||||
else if (human_agent.gender == "female")
|
||||
registered_name = "[pick(GLOB.first_names_female)] [pick(GLOB.last_names)]"
|
||||
else
|
||||
registered_name = "[pick(GLOB.first_names)] [pick(GLOB.last_names)]"
|
||||
else
|
||||
alert ("Invalid name.")
|
||||
return
|
||||
else
|
||||
registered_name = t
|
||||
|
||||
var/u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")as text | null),1,MAX_MESSAGE_LEN)
|
||||
if(!u)
|
||||
|
||||
Reference in New Issue
Block a user