diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 6ea75059a5a..b382bb1e678 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -56,6 +56,11 @@ var/list/skin_tones = list( "african2" ) +var/list/mutant_races = list( + "human", + "lizard", + ) + proc/age2agedescription(age) switch(age) if(0 to 1) return "infant" diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 23543be4bc7..fac874e70d7 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -83,6 +83,7 @@ var/continuous_round_wiz = 0 var/continuous_round_malf = 0 var/show_game_type_odds = 0 //if set this allows players to see the odds of each roundtype on the get revision screen + var/mutant_races = 0 //players can choose their mutant race before joining the game var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced." var/alert_desc_blue_upto = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted." @@ -375,6 +376,8 @@ config.sandbox_autoclose = 1 if("default_laws") config.default_laws = text2num(value) + if("join_with_mutant_race") + config.mutant_races = 1 else diary << "Unknown setting in configuration: '[name]'" diff --git a/code/game/dna.dm b/code/game/dna.dm index ca11d0f0d8b..d969e6bc1a1 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -23,9 +23,6 @@ var/mutantrace = null //The type of mutant race the player is if applicable (i.e. potato-man) var/real_name //Stores the real name of the person who originally got this dna datum. Used primarely for changelings, -/datum/dna/New() - if(!blood_type) blood_type = random_blood_type() - /datum/dna/proc/generate_uni_identity(mob/living/carbon/character) . = "" var/list/L = new /list(DNA_UNI_IDENTITY_BLOCKS) @@ -69,7 +66,7 @@ if(!istype(owner, /mob/living/carbon/monkey) && !istype(owner, /mob/living/carbon/human)) return if(!owner.dna) - owner.dna = new /datum/dna() + create_dna(owner) if(real_name) owner.real_name = real_name @@ -116,7 +113,7 @@ if(!istype(character, /mob/living/carbon/monkey) && !istype(character, /mob/living/carbon/human)) return if(!character.dna) - character.dna = new /datum/dna() + create_dna(character) if(blood_type) character.dna.blood_type = blood_type character.dna.real_name = character.real_name @@ -125,6 +122,9 @@ character.dna.unique_enzymes = character.dna.generate_unique_enzymes(character) return character.dna +/proc/create_dna(mob/living/carbon/C) //don't use this unless you're about to use hardset_dna or ready_dna + C.dna = new /datum/dna() + /////////////////////////// DNA DATUM /////////////////////////// DNA HELPER-PROCS diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 34b340c0e29..0c41ac80b17 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -53,6 +53,7 @@ datum/preferences var/facial_hair_color = "000" //Facial hair color var/skin_tone = "caucasian1" //Skin color var/eye_color = "000" //Eye color + var/mutant_race = "human" //Mutant race //Mob preview var/icon/preview_icon_front = null @@ -163,6 +164,10 @@ datum/preferences dat += "
| "
+ if(config.mutant_races)
+ dat += "Mutant Race: [mutant_race] " + else + dat += "Mutant Race: human " dat += "Blood Type: [blood_type] " dat += "Skin Tone: [skin_tone] " dat += "Underwear: [underwear] " @@ -612,6 +617,11 @@ datum/preferences if(new_eyes) eye_color = sanitize_hexcolor(new_eyes) + if("mutant_race") + var/new_mutant_race = input(user, "Choose your character's mutant race:", "Character Preference") as null|anything in mutant_races + if(new_mutant_race) + mutant_race = new_mutant_race + if("s_tone") var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in skin_tones if(new_s_tone) @@ -712,6 +722,8 @@ datum/preferences character.name = character.real_name if(character.dna) character.dna.real_name = character.real_name + if(mutant_race != "human" && config.mutant_races) + character.dna.mutantrace = mutant_race character.gender = gender character.age = age diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 29a289dd610..1204bf5edee 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -165,6 +165,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["facial_style_name"] >> facial_hair_style S["underwear"] >> underwear S["backbag"] >> backbag + S["mutant_race"] >> mutant_race //Jobs S["userandomjob"] >> userandomjob @@ -202,6 +203,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car eye_color = sanitize_hexcolor(eye_color, 3, 0) skin_tone = sanitize_inlist(skin_tone, skin_tones) backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag)) + mutant_race = sanitize_text(mutant_race, initial(mutant_race)) userandomjob = sanitize_integer(userandomjob, 0, 1, initial(userandomjob)) job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high)) @@ -238,6 +240,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["facial_style_name"] << facial_hair_style S["underwear"] << underwear S["backbag"] << backbag + S["mutant_race"] << mutant_race //Jobs S["userandomjob"] << userandomjob diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 597ee6a8b5d..dafa1dcff3b 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -330,6 +330,8 @@ var/mob/living/carbon/human/new_character = new(loc) new_character.lastarea = get_area(loc) + create_dna(new_character) + if(config.force_random_names || appearance_isbanned(src)) client.prefs.random_character() client.prefs.real_name = random_name(gender) diff --git a/config/game_options.txt b/config/game_options.txt index 4f97e237f99..1ce50aa0eb5 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -184,3 +184,6 @@ SEC_START_BRIG ## Set to 1 for "custom", silicons will start with the custom laws defined in silicon_laws.txt. (If silicon_laws.txt is empty, the AI will spawn with asimov and Custom boards will auto-delete.) ## Set to 2 for "random", silicons will start with a random lawset picked from (at the time of writing): P.A.L.A.D.I.N., Corporate, Asimov. More can be added by changing the law datum paths in ai_laws.dm. DEFAULT_LAWS 1 + +## Uncoment to give players the choice of their mutantrace before they join the game +#JOIN_WITH_MUTANT_RACE \ No newline at end of file |