Convert species, organ_data, and rlimb_data to TG (#19277)

* First test batch bulk change

* remove desync'd old file

* Small change
This commit is contained in:
Aura Dusklight
2026-03-21 04:06:36 -04:00
committed by GitHub
parent c29f169011
commit c6f10bfeb3
32 changed files with 337 additions and 187 deletions
+3 -2
View File
@@ -82,10 +82,11 @@
return 1
else if(isnewplayer(player.current))
if(player.current.client && player.current.client.prefs)
var/datum/species/S = GLOB.all_species[player.current.client.prefs.species]
var/datum/species/S = GLOB.all_species[player.current.client.prefs.read_preference(/datum/preference/choiced/species)]
if(S && (S.flags & (NO_SLEEVE|NO_DNA)))
return 0
if(player.current.client.prefs.organ_data[BP_TORSO] == "cyborg") // Full synthetic. // TODO, this to issynthetic()?
var/list/organ_data = player.current.client.prefs.read_preference(/datum/preference/organ_data)
if(organ_data && organ_data[BP_TORSO] == "cyborg") // Full synthetic. // TODO, this to issynthetic()?
return 0
return 1
return 0
+5 -5
View File
@@ -50,7 +50,7 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations)
var/datum/job/job = GetJob(rank)
if(!job)
return 0
if((job.minimum_character_age || job.min_age_by_species) && (player.read_preference(/datum/preference/numeric/human/age) < job.get_min_age(player.client.prefs.species, player.client.prefs.organ_data[O_BRAIN])))
if((job.minimum_character_age || job.min_age_by_species) && (player.read_preference(/datum/preference/numeric/human/age) < job.get_min_age(player.client.prefs.read_preference(/datum/preference/choiced/species), player.client.prefs.read_preference(/datum/preference/organ_data)?[O_BRAIN])))
return 0
if(jobban_isbanned(player, rank))
return 0
@@ -100,7 +100,7 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations)
if(!job.player_old_enough(player.client))
Debug("FOC player not old enough, Player: [player]")
continue
if(job.minimum_character_age && (player.read_preference(/datum/preference/numeric/human/age) < job.get_min_age(player.client.prefs.species, player.client.prefs.organ_data[O_BRAIN])))
if(job.minimum_character_age && (player.read_preference(/datum/preference/numeric/human/age) < job.get_min_age(player.client.prefs.read_preference(/datum/preference/choiced/species), player.client.prefs.read_preference(/datum/preference/organ_data)?[O_BRAIN])))
Debug("FOC character not old enough, Player: [player]")
continue
//VOREStation Code Start
@@ -125,7 +125,7 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations)
if(!job)
continue
if((job.minimum_character_age || job.min_age_by_species) && (player.read_preference(/datum/preference/numeric/human/age) < job.get_min_age(player.client.prefs.species, player.client.prefs.organ_data[O_BRAIN])))
if((job.minimum_character_age || job.min_age_by_species) && (player.read_preference(/datum/preference/numeric/human/age) < job.get_min_age(player.client.prefs.read_preference(/datum/preference/choiced/species), player.client.prefs.read_preference(/datum/preference/organ_data)?[O_BRAIN])))
continue
if(istype(job, GetJob(JOB_ALT_VISITOR))) // We don't want to give him assistant, that's boring! //VOREStation Edit - Visitor not Assistant
@@ -183,10 +183,10 @@ GLOBAL_DATUM(job_master, /datum/controller/occupations)
if(!V.client) continue
var/age = V.read_preference(/datum/preference/numeric/human/age)
if(age < job.get_min_age(V.client.prefs.species, V.client.prefs.organ_data[O_BRAIN])) // Nope.
if(age < job.get_min_age(V.client.prefs.read_preference(/datum/preference/choiced/species), V.client.prefs.read_preference(/datum/preference/organ_data)?[O_BRAIN])) // Nope.
continue
var/idealage = job.get_ideal_age(V.client.prefs.species, V.client.prefs.organ_data[O_BRAIN])
var/idealage = job.get_ideal_age(V.client.prefs.read_preference(/datum/preference/choiced/species), V.client.prefs.read_preference(/datum/preference/organ_data)?[O_BRAIN])
var/agediff = abs(idealage - age) // Compute the absolute difference in age from target
switch(agediff) /// If the math sucks, it's because I almost failed algebra in high school.
if(20 to INFINITY)
@@ -62,7 +62,7 @@
if(!landmark)
return
var/mob/living/carbon/human/avatar = new(get_turf(landmark), client.prefs.species)
var/mob/living/carbon/human/avatar = new(get_turf(landmark), client.prefs.read_preference(/datum/preference/choiced/species))
if(!avatar)
to_chat(src, "Something went wrong and spawning failed.")
return
@@ -133,7 +133,7 @@
return
//No whitelist
if(!is_alien_whitelisted(user.client, GLOB.all_species[user.client.prefs.species]))
if(!is_alien_whitelisted(user.client, GLOB.all_species[user.client.prefs.read_preference(/datum/preference/choiced/species)]))
to_chat(user, span_warning("You cannot use this spawnpoint to spawn as a species you are not whitelisted for!"))
return
@@ -211,7 +211,7 @@
return
//No whitelist
if(!is_alien_whitelisted(user.client, GLOB.all_species[user.client.prefs.species]))
if(!is_alien_whitelisted(user.client, GLOB.all_species[user.client.prefs.read_preference(/datum/preference/choiced/species)]))
to_chat(user, span_warning("You cannot use this spawnpoint to spawn as a species you are not whitelisted for!"))
return
@@ -39,7 +39,7 @@
if("Morph")
create_morph(user)
if("Lurker")
if(!is_alien_whitelisted(user.client, GLOB.all_species[user.client.prefs.species]))
if(!is_alien_whitelisted(user.client, GLOB.all_species[user.client.prefs.read_preference(/datum/preference/choiced/species)]))
to_chat(user, span_warning("You cannot use this spawnpoint to spawn as a species you are not whitelisted for!"))
return
create_lurker(user)
+3 -2
View File
@@ -416,9 +416,10 @@ GLOBAL_LIST_INIT(species_sound_map, list(
*/
/proc/select_default_species_sound(var/datum/preferences/pref) // Called in character setup. This is similar to check_gendered_sounds, except here we pull from the prefs.
// First, we determine if we're custom-choosing a body or if we're a base game species.
var/datum/species/valid = GLOB.all_species[pref.species]
var/pref_species = pref.read_preference(/datum/preference/choiced/species)
var/datum/species/valid = GLOB.all_species[pref_species]
if(valid.selects_bodytype == (SELECTS_BODYTYPE_CUSTOM || SELECTS_BODYTYPE_SHAPESHIFTER)) // Custom species or xenochimera handling here
valid = coalesce(GLOB.all_species[pref.custom_base], GLOB.all_species[pref.species])
valid = coalesce(GLOB.all_species[pref.custom_base], GLOB.all_species[pref_species])
// Now we start getting our sounds.
var/id_gender = pref.read_preference(/datum/preference/choiced/gender/identifying)
if(valid.gender_specific_species_sounds) // Do we have gender-specific sounds?