Adds defines for species and bodytypes (#9707)

This commit is contained in:
Cyantime
2020-08-24 13:59:24 +02:00
committed by GitHub
parent 02f436ce3d
commit 1a8940bbd8
148 changed files with 880 additions and 783 deletions
@@ -119,7 +119,7 @@
/datum/category_item/player_setup_item/general/basic/sanitize_character()
if(!pref.species || !(pref.species in playable_species))
pref.species = "Human"
pref.species = SPECIES_HUMAN
pref.age = sanitize_integer(text2num(pref.age), pref.getMinAge(), pref.getMaxAge(), initial(pref.age))
pref.gender = sanitize_gender(pref.gender, pref.species)
@@ -47,7 +47,7 @@
// Nothing to validate. Leave.
return
var/datum/species/S = all_species[pref.species] || all_species["Human"]
var/datum/species/S = all_species[pref.species] || all_species[SPECIES_HUMAN]
if (pref.alternate_languages.len > S.num_alternate_languages)
if(pref.client)
@@ -599,7 +599,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.rlimb_data[second_limb] = null
if("Prosthesis")
var/tmp_species = pref.species ? pref.species : "Human"
var/tmp_species = pref.species ? pref.species : SPECIES_HUMAN
var/list/usable_manufacturers = list()
for(var/company in chargen_robolimbs)
var/datum/robolimb/M = chargen_robolimbs[company]
@@ -676,7 +676,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
/datum/category_item/player_setup_item/general/body/proc/SetSpecies(mob/user)
if(!pref.species_preview || !(pref.species_preview in all_species))
pref.species_preview = "Human"
pref.species_preview = SPECIES_HUMAN
var/datum/species/current_species = all_species[pref.species_preview]
var/list/dat = list(
"<center><h2>[current_species.name] \[<a href='?src=\ref[src];show_species=1'>change</a>\]</h2></center><hr/>",