Skip to content

Commit

Permalink
Random Names for Lizards
Browse files Browse the repository at this point in the history
Lizards now have their own list of names to pull from when randomizing their names.
  • Loading branch information
Ikarrus committed Jul 6, 2015
1 parent e55c665 commit b0cfaf4
Show file tree
Hide file tree
Showing 16 changed files with 489 additions and 34 deletions.
8 changes: 8 additions & 0 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@
if(i != attempts_to_find_unique_name && !findname(.))
break

/proc/random_lizard_name(gender, attempts_to_find_unique_name=10)
for(var/i=1, i<=attempts_to_find_unique_name, i++)
if(gender==FEMALE) . = capitalize(pick(lizard_names_female))
else . = capitalize(pick(lizard_names_male))

if(i != attempts_to_find_unique_name && !findname(.))
break

/proc/random_skin_tone()
return pick(skin_tones)

Expand Down
9 changes: 6 additions & 3 deletions code/__HELPERS/names.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,12 @@ var/syndicate_code_response//Code response for traitors.
if(names.len&&prob(70))
code_phrase += pick(names)
else
code_phrase += pick(pick(first_names_male,first_names_female))
code_phrase += " "
code_phrase += pick(last_names)
if(prob(20))
code_phrase += pick(pick(lizard_names_male,lizard_names_female))
else
code_phrase += pick(pick(first_names_male,first_names_female))
code_phrase += " "
code_phrase += pick(last_names)
if(2)
code_phrase += pick(get_all_jobs())//Returns a job.
safety -= 1
Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/lists/names.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var/list/commando_names = file2list("config/names/death_commando.txt")
var/list/first_names_male = file2list("config/names/first_male.txt")
var/list/first_names_female = file2list("config/names/first_female.txt")
var/list/last_names = file2list("config/names/last.txt")
var/list/lizard_names_male = file2list("config/names/lizard_male.txt")
var/list/lizard_names_female = file2list("config/names/lizard_female.txt")
var/list/clown_names = file2list("config/names/clown.txt")
var/list/mime_names = file2list("config/names/mime.txt")

Expand Down
19 changes: 13 additions & 6 deletions code/datums/diseases/advance/symptoms/voice_change.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,19 @@ Bonus
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/random_name = ""
switch(H.gender)
if(MALE)
random_name = pick(first_names_male)
else
random_name = pick(first_names_female)
random_name += " [pick(last_names)]"
if(H.dna.species.id == "lizard")
switch(H.gender)
if(MALE)
random_name = pick(lizard_names_male)
else
random_name = pick(lizard_names_female)
else
switch(H.gender)
if(MALE)
random_name = pick(first_names_male)
else
random_name = pick(first_names_female)
random_name += " [pick(last_names)]"
H.SetSpecialVoice(random_name)

return
Expand Down
19 changes: 14 additions & 5 deletions code/game/gamemodes/nuclear/nuclear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,19 @@

/proc/NukeNameAssign(var/lastname,var/list/syndicates)
for(var/datum/mind/synd_mind in syndicates)
switch(synd_mind.current.gender)
if(MALE)
synd_mind.name = "[pick(first_names_male)] [lastname]"
if(FEMALE)
synd_mind.name = "[pick(first_names_female)] [lastname]"
var/mob/living/carbon/human/H = synd_mind.current
if(H.dna.species.id == "lizard")
switch(synd_mind.current.gender)
if(MALE)
synd_mind.name = pick(lizard_names_male)
if(FEMALE)
synd_mind.name = pick(lizard_names_female)
else
switch(synd_mind.current.gender)
if(MALE)
synd_mind.name = pick(first_names_male)
if(FEMALE)
synd_mind.name = pick(first_names_female)
synd_mind.name += " [lastname]"
synd_mind.current.real_name = synd_mind.name
return
5 changes: 4 additions & 1 deletion code/game/machinery/computer/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,10 @@
if(prob(10/severity))
switch(rand(1,6))
if(1)
R.fields["name"] = random_name(R.fields["sex"],1)
if(prob(20))
R.fields["name"] = random_lizard_name(R.fields["sex"],1)
else
R.fields["name"] = random_name(R.fields["sex"],1)
if(2)
R.fields["sex"] = pick("Male", "Female")
if(3)
Expand Down
5 changes: 4 additions & 1 deletion code/game/machinery/computer/security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,10 @@ What a mess.*/
if(prob(10/severity))
switch(rand(1,8))
if(1)
R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
if(prob(20))
R.fields["name"] = "[pick(pick(lizard_names_male), pick(lizard_names_female))]"
else
R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
if(2)
R.fields["sex"] = pick("Male", "Female")
if(3)
Expand Down
24 changes: 14 additions & 10 deletions code/modules/admin/verbs/one_click_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,10 @@
var/mob/living/carbon/human/newmob = new (pick(emergencyresponseteamspawn))
chosen_candidate.client.prefs.copy_to(newmob)
ready_dna(newmob)
newmob.real_name = random_name(newmob.gender)
if(newmob.dna.species.id == "lizard")
newmob.real_name = random_lizard_name(newmob.gender)
else
newmob.real_name = random_name(newmob.gender)
newmob.key = chosen_candidate.key
newmob.mind.assigned_role = "Centcom Official"
equip_centcomofficial(newmob)
Expand Down Expand Up @@ -492,27 +495,28 @@
var/list/lastname = last_names
chosen_candidate.client.prefs.copy_to(ERTOperative)
ready_dna(ERTOperative)
var/ertname = ((ERTOperative.dna.species.id == "lizard") ? (ERTOperative.gender==MALE ? pick(lizard_names_male) : pick(lizard_names_female)) : pick(lastname))
switch(numagents)
if(1)
ERTOperative.real_name = "Commander [pick(lastname)]"
ERTOperative.real_name = "Commander [ertname]"
equip_emergencyresponsesquad(ERTOperative, "commander",redalert)
if(2)
ERTOperative.real_name = "Security Officer [pick(lastname)]"
ERTOperative.real_name = "Security Officer [ertname]"
equip_emergencyresponsesquad(ERTOperative, "sec",redalert)
if(3)
ERTOperative.real_name = "Medical Officer [pick(lastname)]"
ERTOperative.real_name = "Medical Officer [ertname]"
equip_emergencyresponsesquad(ERTOperative, "med",redalert)
if(4)
ERTOperative.real_name = "Engineer [pick(lastname)]"
ERTOperative.real_name = "Engineer [ertname]"
equip_emergencyresponsesquad(ERTOperative, "eng",redalert)
if(5)
ERTOperative.real_name = "Security Officer [pick(lastname)]"
ERTOperative.real_name = "Security Officer [ertname]"
equip_emergencyresponsesquad(ERTOperative, "sec",redalert)
if(6)
ERTOperative.real_name = "Medical Officer [pick(lastname)]"
ERTOperative.real_name = "Medical Officer [ertname]"
equip_emergencyresponsesquad(ERTOperative, "med",redalert)
if(7)
ERTOperative.real_name = "Engineer [pick(lastname)]"
ERTOperative.real_name = "Engineer [ertname]"
equip_emergencyresponsesquad(ERTOperative, "eng",redalert)
ERTOperative.key = chosen_candidate.key
ERTOperative.mind.assigned_role = "ERT"
Expand Down Expand Up @@ -590,9 +594,9 @@
temp.abductors |= list(agent_mind,scientist_mind)
temp.make_abductor_team(number,preset_scientist=scientist_mind,preset_agent=agent_mind)
temp.post_setup_team(number)

ticker.mode.abductor_teams++

if(ticker.mode.config_tag != "abduction")
ticker.mode.abductors |= temp.abductors

Expand Down
5 changes: 4 additions & 1 deletion code/modules/admin/verbs/randomverbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
A.copy_to(new_character)

if(!new_character.real_name)
new_character.real_name = random_name(new_character.gender)
if(new_character.dna.species.id == "lizard")
new_character.real_name = random_lizard_name(new_character.gender)
else
new_character.real_name = random_name(new_character.gender)
new_character.name = new_character.real_name

if(G_found.mind && !G_found.mind.active)
Expand Down
15 changes: 12 additions & 3 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
return
//we couldn't load character data so just randomize the character appearance + name
random_character() //let's create a random character then - rather than a fat, bald and naked man.
real_name = random_name(gender)
if(pref_species.id == "lizard")
real_name = random_lizard_name(gender)
else
real_name = random_name(gender)
if(!loaded_preferences_successfully)
save_preferences()
save_character() //let's save this new random character so it doesn't keep generating new ones.
Expand Down Expand Up @@ -674,7 +677,10 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
if("random")
switch(href_list["preference"])
if("name")
real_name = random_name(gender)
if(pref_species.id == "lizard")
real_name = random_lizard_name(gender)
else
real_name = random_name(gender)
if("age")
age = rand(AGE_MIN, AGE_MAX)
if("hair")
Expand Down Expand Up @@ -1029,7 +1035,10 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set

proc/copy_to(mob/living/carbon/human/character)
if(be_random_name)
real_name = random_name(gender)
if(pref_species.id == "lizard")
real_name = random_lizard_name(gender)
else
real_name = random_name(gender)

if(be_random_body)
random_character(gender)
Expand Down
15 changes: 14 additions & 1 deletion code/modules/events/wizard/race.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,26 @@
if(!S.dangerous_existence)
all_species += speciestype

var/new_species = pick(all_species)
var/datum/species/new_species = pick(all_species)

if(prob(50))
all_the_same = 1

for(var/mob/living/carbon/human/H in mob_list) //yes, even the dead
if(H.dna)
if(new_species.id != H.dna.species.id) //Change their name if their species changes
if(new_species.id == "lizard")
switch(H.gender)
if(MALE)
H.real_name = pick(lizard_names_male)
if(FEMALE)
H.real_name = pick(lizard_names_female)
else
switch(H.gender)
if(MALE)
H.real_name = pick(first_names_male)
if(FEMALE)
H.real_name = pick(first_names_female)
hardset_dna(H, null, null, null, null, new_species)
H.regenerate_icons()
H << "<span class='notice'>You feel somehow... different?</span>"
Expand Down
5 changes: 4 additions & 1 deletion code/modules/mob/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,10 @@

if(config.force_random_names || appearance_isbanned(src))
client.prefs.random_character()
client.prefs.real_name = random_name(gender)
if(client.prefs.pref_species.id == "lizard")
client.prefs.real_name = random_lizard_name(gender)
else
client.prefs.real_name = random_name(gender)
client.prefs.copy_to(new_character)

if(mind)
Expand Down
4 changes: 3 additions & 1 deletion code/modules/ninja/suit/mask.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ Contents:
switch(chance)
if(1 to 50)//High chance of a regular name.
voice = "[rand(0,1) == 1 ? pick(first_names_female) : pick(first_names_male)] [pick(last_names)]"
if(51 to 80)//Smaller chance of a clown name.
if(51 to 70)//Smaller chance of a lizard name.
voice = "[pick(pick(lizard_names_female), pick(lizard_names_male))]"
if(71 to 80)//Small chance of a clown name.
voice = "[pick(clown_names)]"
if(81 to 90)//Small chance of a wizard name.
voice = "[pick(wizard_first)] [pick(wizard_second)]"
Expand Down
5 changes: 4 additions & 1 deletion code/modules/surgery/plastic_surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
user.visible_message("[user] successfully restores [target]'s appearance!", "<span class='notice'>You successfully restore [target]'s appearance.</span>")
else
var/oldname = target.real_name
target.real_name = random_name(target.gender)
if(target.dna.species.id == "lizard")
target.real_name = random_lizard_name(target.gender)
else
target.real_name = random_name(target.gender)
var/newname = target.real_name //something about how the code handles names required that I use this instead of target.real_name
user.visible_message("[user] alters [oldname]'s appearance completely, they are now [newname]!", "<span class='notice'>You alter [oldname]'s appearance completely, they are now [newname].</span>")
return 1
Loading

0 comments on commit b0cfaf4

Please sign in to comment.