Skip to content

Commit

Permalink
Adds a random roman name button
Browse files Browse the repository at this point in the history
  • Loading branch information
xPokee committed Jun 4, 2024
1 parent bc625d7 commit 5db82c2
Show file tree
Hide file tree
Showing 8 changed files with 1,336 additions and 17 deletions.
10 changes: 10 additions & 0 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@
if(!findname(.))
break

/proc/random_unique_legion_name(gender, attempts_to_find_unique_name=10)
for(var/i in 1 to attempts_to_find_unique_name)
if(gender==FEMALE)
. = capitalize(pick(GLOB.first_names_female_legion)) + " " + capitalize(pick(GLOB.last_names_legion))
else
. = capitalize(pick(GLOB.first_names_male_legion)) + " " + capitalize(pick(GLOB.last_names_legion))

if(!findname(.))
break

/proc/random_unique_lizard_name(gender, attempts_to_find_unique_name=10)
for(var/i in 1 to attempts_to_find_unique_name)
. = capitalize(lizard_name(gender))
Expand Down
3 changes: 3 additions & 0 deletions code/_globalvars/lists/names.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ 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"))
GLOBAL_LIST_INIT(first_names_male_legion, world.file2list("strings/names/firstlegion_male.txt"))
GLOBAL_LIST_INIT(first_names_female_legion, world.file2list("strings/names/firstlegion_female.txt"))
GLOBAL_LIST_INIT(last_names_legion, world.file2list("strings/names/lastlegion.txt"))
GLOBAL_LIST_INIT(lizard_names_male, world.file2list("strings/names/lizard_male.txt"))
GLOBAL_LIST_INIT(lizard_names_female, world.file2list("strings/names/lizard_female.txt"))
GLOBAL_LIST_INIT(carp_names, world.file2list("strings/names/carp.txt"))
Expand Down
6 changes: 6 additions & 0 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(jobban_isbanned(user, "appearance"))
dat += "<b>You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.</b><br>"
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=name;task=random'>Random Name</A> "
dat += "<a style='display:block;width:150px' href='?_src_=prefs;preference=romanname;task=random'>Random Roman Name</A> "
dat += "<b>Always Random Name:</b><a style='display:block;width:30px' href='?_src_=prefs;preference=name'>[be_random_name ? "Yes" : "No"]</a><BR>"

dat += "<b>Name:</b> "
Expand Down Expand Up @@ -1341,6 +1342,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(isnewplayer(parent.mob)) // Update the player panel with the new name.
var/mob/dead/new_player/player_mob = parent.mob
player_mob.new_player_panel()
if("romanname")
real_name = pref_species.random_name_legion(gender,1)
if(isnewplayer(parent.mob)) // Update the player panel with the new name.
var/mob/dead/new_player/player_mob = parent.mob
player_mob.new_player_panel()
if("age")
age = rand(AGE_MIN, AGE_MAX)
if("hair")
Expand Down
4 changes: 2 additions & 2 deletions code/modules/jobs/job_types/legion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Weapons Lever shotgun, Grease gun, Repeater carbines, Revolvers, simple guns al
return
if(H.gender == FEMALE)
H.gender = MALE
H.real_name = random_unique_name(MALE)
H.real_name = random_unique_legion_name(MALE)
H.name = H.real_name
if(H.wear_id)
var/obj/item/card/id/dogtag/L = H.wear_id
Expand Down Expand Up @@ -1230,7 +1230,7 @@ Weapons Lever shotgun, Grease gun, Repeater carbines, Revolvers, simple guns al
return
if(H.gender == MALE)
H.gender = FEMALE
H.real_name = random_unique_name(FEMALE)
H.real_name = random_unique_legion_name(FEMALE)
H.name = H.real_name
if(H.wear_id)
var/obj/item/card/id/dogtag/L = H.wear_id
Expand Down
17 changes: 17 additions & 0 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,23 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)

return randname

/datum/species/proc/random_name_legion(gender,unique,lastname)
if(unique)
return random_unique_legion_name(gender)

var/randnameleg
if(gender == MALE)
randnameleg = pick(GLOB.first_names_male_legion)
else
randnameleg = pick(GLOB.first_names_female_legion)

if(lastname)
randnameleg += " [lastname]"
else
randnameleg += " [pick(GLOB.last_names_legion)]"

return randnameleg

//Called when cloning, copies some vars that should be kept
/datum/species/proc/copy_properties_from(datum/species/old_species)
mutant_bodyparts["limbs_id"] = old_species.mutant_bodyparts["limbs_id"]
Expand Down
116 changes: 111 additions & 5 deletions strings/names/firstlegion_female.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,114 @@
Agnes
Bellona
Cecilia
Aelia
Aeliana
Aemilia
Aemiliana
Agrippa
Agrippina
Alba
Albana
Albina
Antonia
Antonina
Aquila
Aquilina
Augusta
Augustina
Aurelia
Aureliana
Balbina
Blandina
Caecilia
Caelia
Caelina
Caesonia
Calpurnia
Camilla
Cassia
Claudia
Mila
Cloelia
Cornelia
Decima
Domitia
Domitilla
Drusa
Drusilla
Fabia
Fabiana
Fabiola
Fabricia
Fausta
Faustina
Flaminia
Flavia
Flaviana
Floriana
Fulvia
Galla
Germana
Glaucia
Gratiana
Hadriana
Helvia
Herminia
Hilaria
Horatia
Hortensia
Iovita
Iulia
Iuliana
Iunia
Julia
Juliana
Junia
Laelia
Laurentia
Laurentina
Livia
Liviana
Longina
Lucia
Luciana
Lucilia
Lucilla
Lucretia
Marcella
Marcellina
Marcia
Marciana
Mariana
Marina
Martina
Maxima
Maximiliana
Nona
Octavia
Ovidia
Paula
Paulina
Petronia
Pompeia
Pomponia
Porcia
Prisca
Priscilla
Quinta
Quintina
Rufina
Sabina
Saturnina
Septima
Severina
Silvina
Tacita
Tatiana
Tertia
Titiana
Tullia
Valentina
Vesta
Valeria
Valeriana
Varinia
Verginia
Vibiana
Virginia
Vita
Loading

0 comments on commit 5db82c2

Please sign in to comment.