mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-25 22:28:44 +01:00
[MIRROR] Convert species, organ_data, and rlimb_data to TG (#12570)
This commit is contained in:
@@ -85,15 +85,16 @@ GLOBAL_LIST_EMPTY(active_autoresleevers)
|
||||
|
||||
var/client/ghost_client = ghost.client
|
||||
|
||||
if(!is_alien_whitelisted(ghost.client, GLOB.all_species[ghost_client?.prefs?.species]) && !check_rights(R_ADMIN, 0)) // Prevents a ghost ghosting in on a slot and spawning via a resleever with race they're not whitelisted for, getting around normal join restrictions.
|
||||
if(!is_alien_whitelisted(ghost.client, GLOB.all_species[ghost_client?.prefs?.read_preference(/datum/preference/choiced/species)]) && !check_rights(R_ADMIN, 0)) // Prevents a ghost ghosting in on a slot and spawning via a resleever with race they're not whitelisted for, getting around normal join restrictions.
|
||||
to_chat(ghost, span_warning("You are not whitelisted to spawn as this species!"))
|
||||
return
|
||||
|
||||
// CHOMPedit start
|
||||
|
||||
var/datum/species/chosen_species
|
||||
if(ghost.client.prefs.species) // In case we somehow don't have a species set here.
|
||||
chosen_species = GLOB.all_species[ghost_client.prefs.species]
|
||||
var/pref_species = ghost.client.prefs.read_preference(/datum/preference/choiced/species)
|
||||
if(pref_species) // In case we somehow don't have a species set here.
|
||||
chosen_species = GLOB.all_species[pref_species]
|
||||
|
||||
if((chosen_species.spawn_flags & SPECIES_IS_WHITELISTED) || (chosen_species.spawn_flags & SPECIES_IS_RESTRICTED))
|
||||
to_chat(ghost, span_warning("This species cannot be resleeved!"))
|
||||
|
||||
Reference in New Issue
Block a user