mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 22:57:39 +01:00
[MIRROR] Convert species, organ_data, and rlimb_data to TG (#12570)
This commit is contained in:
@@ -392,8 +392,9 @@
|
||||
|
||||
var/use_species_name
|
||||
var/datum/species/chosen_species
|
||||
if(client.prefs.species)
|
||||
chosen_species = GLOB.all_species[client.prefs.species]
|
||||
var/pref_species = client.prefs.read_preference(/datum/preference/choiced/species)
|
||||
if(pref_species)
|
||||
chosen_species = GLOB.all_species[pref_species]
|
||||
use_species_name = chosen_species.get_station_variant() //Only used by pariahs atm.
|
||||
|
||||
if(chosen_species && use_species_name)
|
||||
@@ -475,8 +476,9 @@
|
||||
|
||||
/mob/new_player/get_species()
|
||||
var/datum/species/chosen_species
|
||||
if(client.prefs.species)
|
||||
chosen_species = GLOB.all_species[client.prefs.species]
|
||||
var/pref_species = client.prefs.read_preference(/datum/preference/choiced/species)
|
||||
if(pref_species)
|
||||
chosen_species = GLOB.all_species[pref_species]
|
||||
|
||||
if(!chosen_species)
|
||||
return SPECIES_HUMAN
|
||||
|
||||
@@ -27,18 +27,18 @@
|
||||
to_chat(src,span_warning("You have not set your scale yet. Do this on the VORE tab in character setup."))
|
||||
|
||||
//Can they play?
|
||||
if(!is_alien_whitelisted(src.client,GLOB.all_species[client?.prefs?.species]) && !check_rights(R_ADMIN, 0))
|
||||
if(!is_alien_whitelisted(src.client,GLOB.all_species[client?.prefs?.read_preference(/datum/preference/choiced/species)]) && !check_rights(R_ADMIN, 0))
|
||||
pass = FALSE
|
||||
to_chat(src,span_warning("You are not allowed to spawn in as this species."))
|
||||
|
||||
//CHOMPEdit Begin - Check species job bans... (Only used for shadekin)
|
||||
if(J.is_species_banned(client?.prefs?.species, client?.prefs?.organ_data["brain"]))
|
||||
if(J.is_species_banned(client?.prefs?.read_preference(/datum/preference/choiced/species), client?.prefs?.read_preference(/datum/preference/organ_data)?[O_BRAIN]))
|
||||
pass = FALSE
|
||||
to_chat(src,span_warning("Your species is not permitted to take this role or job."))
|
||||
//CHOMPEdit End
|
||||
|
||||
//Custom species checks
|
||||
if (client?.prefs?.species == "Custom Species")
|
||||
if (client?.prefs?.read_preference(/datum/preference/choiced/species) == SPECIES_CUSTOM)
|
||||
|
||||
//Didn't name it
|
||||
if(!client?.prefs?.custom_species)
|
||||
@@ -82,10 +82,10 @@
|
||||
if(client?.prefs?.neu_traits)
|
||||
for(var/T in client.prefs.neu_traits)
|
||||
var/datum/trait/instance = GLOB.all_traits[T]
|
||||
if(client.prefs.species in instance.banned_species)
|
||||
if(client.prefs.read_preference(/datum/preference/choiced/species))
|
||||
pass = FALSE
|
||||
to_chat(src,span_warning("One of your traits, [instance.name], is not available for your species! Please fix this conflict and then try again."))
|
||||
else if(LAZYLEN(instance.allowed_species) && !(client.prefs.species in instance.allowed_species)) //We use else if here, so as to prevent getting two errors for one trait.
|
||||
else if(LAZYLEN(instance.allowed_species) && !(client.prefs.read_preference(/datum/preference/choiced/species) in instance.allowed_species)) //We use else if here, so as to prevent getting two errors for one trait.
|
||||
pass = FALSE
|
||||
to_chat(src,span_warning("One of your traits, [instance.name], is not available for your species! Please fix this conflict and then try again."))
|
||||
//CHOMP Addition End
|
||||
|
||||
@@ -276,11 +276,12 @@
|
||||
|
||||
/datum/preferences/proc/get_valid_hairstyles(mob/user)
|
||||
var/list/valid_hairstyles = list()
|
||||
var/pref_species = read_preference(/datum/preference/choiced/species)
|
||||
for(var/hairstyle in GLOB.hair_styles_list)
|
||||
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hairstyle]
|
||||
if(S.name == DEVELOPER_WARNING_NAME)
|
||||
continue
|
||||
if(!(species in S.species_allowed) && (!custom_base || !(custom_base in S.species_allowed)))
|
||||
if(!(pref_species in S.species_allowed) && (!custom_base || !(custom_base in S.species_allowed)))
|
||||
continue
|
||||
if(!S.can_be_selected && (!client || !check_rights_for(client, R_HOLDER)))
|
||||
continue
|
||||
@@ -293,6 +294,7 @@
|
||||
/datum/preferences/proc/get_valid_facialhairstyles()
|
||||
var/list/valid_facialhairstyles = list()
|
||||
var/bio_gender = read_preference(/datum/preference/choiced/gender/biological)
|
||||
var/pref_species = read_preference(/datum/preference/choiced/species)
|
||||
for(var/facialhairstyle in GLOB.facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/S = GLOB.facial_hair_styles_list[facialhairstyle]
|
||||
if(S.name == DEVELOPER_WARNING_NAME)
|
||||
@@ -301,7 +303,7 @@
|
||||
continue
|
||||
if(bio_gender == FEMALE && S.gender == MALE)
|
||||
continue
|
||||
if(!(species in S.species_allowed) && (!custom_base || !(custom_base in S.species_allowed)))
|
||||
if(!(pref_species in S.species_allowed) && (!custom_base || !(custom_base in S.species_allowed)))
|
||||
continue
|
||||
if(!S.can_be_selected && (!client || !check_rights_for(client, R_HOLDER)))
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user