From 78da30ec8d98ae63f2233d5e2b21d7368b11008b Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 29 Oct 2017 00:25:17 -0500 Subject: [PATCH] Update species.dm --- .../mob/living/carbon/human/species.dm | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index c39879c952..aebd1af9ba 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1,5 +1,7 @@ // This code handles different species in the game. +GLOBAL_LIST_EMPTY(roundstart_races) + #define HEAT_DAMAGE_LEVEL_1 2 #define HEAT_DAMAGE_LEVEL_2 3 #define HEAT_DAMAGE_LEVEL_3 8 @@ -12,7 +14,6 @@ var/id // if the game needs to manually check your race to do something not included in a proc here, it will use this var/limbs_id //this is used if you want to use a different species limb sprites. Mainly used for angels as they look like humans. var/name // this is the fluff name. these will be left generic (such as 'Lizardperson' for the lizard race) so servers can change them to whatever - var/roundstart = 0 // can this mob be chosen at roundstart? (assuming the config option is checked?) var/default_color = "#FFF" // if alien colors are disabled, this is the color that will be used by that race var/sexes = 1 // whether or not the race has sexual characteristics. at the moment this is only 0 for skeletons and shadows @@ -65,7 +66,6 @@ var/breathid = "o2" var/obj/item/organ/brain/mutant_brain = /obj/item/organ/brain - var/obj/item/organ/heart/mutant_heart = /obj/item/organ/heart var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes var/obj/item/organ/ears/mutantears = /obj/item/organ/ears var/obj/item/mutanthands @@ -93,6 +93,20 @@ ..() +/proc/generate_selectable_species() + for(var/I in subtypesof(/datum/species)) + var/datum/species/S = new I + if(S.check_roundstart_eligible()) + GLOB.roundstart_races += S.id + qdel(S) + if(!GLOB.roundstart_races.len) + GLOB.roundstart_races += "human" + +/datum/species/proc/check_roundstart_eligible() + if(id in (CONFIG_GET(keyed_flag_list/roundstart_races))) + return TRUE + return FALSE + /datum/species/proc/random_name(gender,unique,lastname) if(unique) return random_unique_name(gender) @@ -155,7 +169,7 @@ heart.Remove(C,1) QDEL_NULL(heart) if(should_have_heart && !heart) - heart = new mutant_heart() + heart = new() heart.Insert(C) if(lungs && (replace_current || !should_have_lungs)) @@ -1153,7 +1167,7 @@ if(radiation > RAD_MOB_VOMIT && prob(RAD_MOB_VOMIT_PROB)) H.vomit(10, TRUE) - + if(radiation > RAD_MOB_MUTATE) if(prob(1)) to_chat(H, "You mutate!")