From 0c448de7c9a9d572b8ac435b84ad2d752fe8d0c0 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 11 Dec 2014 15:11:35 +1030 Subject: [PATCH] Added Skrell blurb, also added language/species-based random name generator. --- code/__HELPERS/mobs.dm | 14 +++++- code/modules/client/preferences.dm | 6 +-- code/modules/mob/language.dm | 46 ++++++++++++++++++- .../mob/living/carbon/human/species.dm | 15 +++++- 4 files changed, 73 insertions(+), 8 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 3c7582b8164..bf18e430407 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -38,8 +38,18 @@ proc/random_facial_hair_style(gender, species = "Human") return f_style proc/random_name(gender, species = "Human") - if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) - else return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) + + var/datum/species/current_species + if(species) + current_species = all_species[species] + + if(!current_species) + if(gender==FEMALE) + return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) + else + return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) + else + return current_species.get_random_name(gender) proc/random_skin_tone() switch(pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino")) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 6da554d41f1..ae8e6ec03df 100755 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -139,7 +139,7 @@ datum/preferences if(load_character()) return gender = pick(MALE, FEMALE) - real_name = random_name(gender) + real_name = random_name(gender,species) gear = list() @@ -1144,7 +1144,7 @@ datum/preferences if("random") switch(href_list["preference"]) if("name") - real_name = random_name(gender) + real_name = random_name(gender,species) if("age") age = rand(AGE_MIN, AGE_MAX) if("hair") @@ -1603,7 +1603,7 @@ datum/preferences /datum/preferences/proc/copy_to(mob/living/carbon/human/character, safety = 0) if(be_random_name) - real_name = random_name(gender) + real_name = random_name(gender,species) if(config.humans_need_surnames) var/firstspace = findtext(real_name, " ") diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 410abb99ec2..09830da1869 100755 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -17,6 +17,24 @@ var/list/syllables // Used when scrambling text for a non-speaker. var/list/space_chance = 55 // Likelihood of getting a space in the random scramble string. +/datum/language/proc/get_random_name(var/gender, name_count=2, syllable_count=4) + if(!syllables || !syllables.len) + if(gender==FEMALE) + return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) + else + return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) + + var/full_name = "" + var/new_name = "" + + for(var/i = 0;i0;x--) + new_name += pick(syllables) + full_name += " [capitalize(lowertext(new_name))]" + + return "[trim(full_name)]" + /datum/language/proc/scramble(var/input) if(!syllables || !syllables.len) @@ -105,6 +123,13 @@ flags = WHITELISTED syllables = list("ss","ss","ss","ss","skak","seeki","resh","las","esi","kor","sh") +/datum/language/unathi/get_random_name() + + var/new_name = ..() + while(findtextEx(new_name,"sss",1,null)) + new_name = replacetext(new_name, "sss", "ss") + return capitalize(new_name) + /datum/language/tajaran name = "Siik'tajr" desc = "The traditionally employed tongue of Ahdomai, composed of expressive yowls and chirps. Native to the Tajaran." @@ -119,6 +144,15 @@ "ka","aasi","far","wa","baq","ara","qara","zir","sam","mak","hrar","nja","rir","khan","jun","dar","rik","kah", \ "hal","ket","jurl","mah","tul","cresh","azu","ragh") +/datum/language/tajaran/get_random_name(var/gender) + + var/new_name = ..(gender,1) + if(prob(80)) + new_name += " [pick(list("Hadii","Kaytam","Zhan-Khazan","Hharar","Njarir'Akhan"))]" + else + new_name += ..(gender,1) + return new_name + /datum/language/skrell name = "Skrellian" desc = "A melodic and complex language spoken by the Skrell of Qerrbalak. Some of the notes are inaudible to humans." @@ -128,7 +162,7 @@ colour = "skrell" key = "k" flags = WHITELISTED - syllables = list("wub","wub","wub","wub","wub","wub","wub","WUB","vwwwworp","SO-LET-THE-BEAT-DROP") + syllables = list("qr","qrr","xuq","qil","quum","xuqm","vol","xrim","zaoo","qu-uu","qix","qoo","zix","*","!") /datum/language/vox name = "Vox-pidgin" @@ -138,10 +172,13 @@ exclaim_verb = "SHRIEKS" colour = "vox" key = "5" - flags = RESTRICTED + flags = WHITELISTED syllables = list("ti","ti","ti","hi","hi","ki","ki","ki","ki","ya","ta","ha","ka","ya","chi","cha","kah", \ "SKRE","AHK","EHK","RAWK","KRA","AAA","EEE","KI","II","KRI","KA") +/datum/language/vox/get_random_name() + return ..(FEMALE,1,6) + /datum/language/diona name = "Rootspeak" desc = "A creaking, subvocal language spoken instinctively by the Dionaea. Due to the unique makeup of the average Diona, a phrase of Rootspeak can be a combination of anywhere from one to twelve individual voices and notes." @@ -153,6 +190,11 @@ flags = RESTRICTED syllables = list("hs","zt","kr","st","sh") +/datum/language/diona/get_random_name() + var/new_name = "[pick(list("To Sleep Beneath","Wind Over","Embrace of","Dreams of","Witnessing","To Walk Beneath","Approaching the"))]" + new_name += " [pick(list("the Void","the Sky","Encroaching Night","Planetsong","Starsong","the Wandering Star","the Empty Day","Daybreak","Nightfall","the Rain"))]" + return new_name + /datum/language/common name = "Galactic Common" desc = "The common galactic tongue." diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index d2ae331a4df..9eda5c0330f 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -25,7 +25,7 @@ var/unarmed_type = /datum/unarmed_attack var/secondary_unarmed_type = /datum/unarmed_attack/bite - var/language // Default racial language, if any. + var/language = "Galactic Common" // Default racial language, if any. // Default language is used when 'say' is used without modifiers. var/default_language = "Galactic Common" var/secondary_langs = list() // The names of secondary languages that are available to this species. @@ -102,6 +102,10 @@ if(unarmed_type) unarmed = new unarmed_type() if(secondary_unarmed_type) secondary_unarmed = new secondary_unarmed_type() +/datum/species/proc/get_random_name(var/gender) + var/datum/language/species_language = all_languages[language] + return species_language.get_random_name(gender) + /datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs. //Trying to work out why species changes aren't fixing organs properly. @@ -291,6 +295,11 @@ language = "Skrellian" primitive = /mob/living/carbon/monkey/skrell unarmed_type = /datum/unarmed_attack/punch + blurb = "An amphibious species, Skrell come from the star system known as Qerr'Vallis, which translates to 'Star of \ + the royals' or 'Light of the Crown'.

Skrell are a highly advanced and logical race who live under the rule \ + of the Qerr'Katish, a caste within their society which keeps the empire of the Skrell running smoothly. Skrell are \ + herbivores on the whole and tend to be co-operative with the other species of the galaxy, although they rarely reveal \ + the secrets of their empire to their allies." flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR @@ -353,6 +362,10 @@ "stack" = /datum/organ/internal/stack/vox ) +/datum/species/vox/get_random_name(var/gender) + var/datum/language/species_language = all_languages[default_language] + return species_language.get_random_name(gender) + /datum/species/vox/armalis name = "Vox Armalis" name_plural = "Vox"