From 2cb6dd1f542da431544f2327b0927cf623b1008c Mon Sep 17 00:00:00 2001 From: 9600bauds Date: Sun, 31 Jan 2016 21:47:48 -0300 Subject: [PATCH] Randomized bloodtype for new humans and monkeys --- code/__HELPERS/mobs.dm | 15 ++++++++++++++- code/modules/mob/living/carbon/human/human.dm | 1 + code/modules/mob/living/carbon/monkey/monkey.dm | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index a2b9d8bf12b..b69843ffbcd 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -166,4 +166,17 @@ proc/add_ghostlogs(var/mob/user, var/obj/target, var/what_done, var/admin=1, var log_ghost("[subject_text] [what_done] [target_text] [addition]") /mob/proc/isVentCrawling() - return (istype(loc, /obj/machinery/atmospherics)) // Crude but no other situation would put them inside of this \ No newline at end of file + return (istype(loc, /obj/machinery/atmospherics)) // Crude but no other situation would put them inside of this + +/proc/random_blood_type() + return pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") + //https://en.wikipedia.org/wiki/Blood_type_distribution_by_country + /*return pick(\ + 41.9; "O+",\ + 31.2; "A+",\ + 15.4; "B+",\ + 4.8; "AB+",\ + 2.9; "O-",\ + 2.7; "A-",\ + 0.8; "B-",\ + 0.3; "AB-")*/ diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0f874b76d59..7c842b94420 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -83,6 +83,7 @@ if(!dna) dna = new /datum/dna(null) dna.species=species.name + dna.b_type = random_blood_type() hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100") hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy") diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 849437dcdbc..4fdb5629ecd 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -81,14 +81,14 @@ setGender(pick(MALE, FEMALE)) dna = new /datum/dna( null ) dna.real_name = real_name - dna.b_type = pick("A+","A-","AB+","AB-","O+","O-") + dna.b_type = random_blood_type() dna.ResetSE() dna.ResetUI() //dna.uni_identity = "00600200A00E0110148FC01300B009" //dna.SetUI(list(0x006,0x002,0x00A,0x00E,0x011,0x014,0x8FC,0x013,0x00B,0x009)) //dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6" //dna.SetSE(list(0x433,0x591,0x567,0x561,0x31E,0x137,0x633,0x34D,0x1C3,0x690,0x120,0x321,0x64D,0x4FE,0x4CD,0x615,0x44B,0x6C0,0x3F2,0x51B,0x6C6,0x0A4,0x282,0x1D2,0x6BA,0x3B0,0xFD6)) - dna.unique_enzymes = md5(name) + dna.unique_enzymes = md5(name) //Possibly not working? // We're a monkey dna.SetSEState(MONKEYBLOCK, 1)