mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 14:37:27 +01:00
Autoresleever checks for whitelist and if species can be resleeved
As it says.
Autoresleever will abort the spawn attempt if the client is not whitelisted for the species (as currently one can ghost, select an autoresleever, and spawn via it even on a whitelisted species they don't have access to normally.)
Autoresleever will abort spawn attempt for species with NO_SCAN in their flags. This prevents Xenochimera/Proteans/etc from rejoining via Autoresleevers, as per whitelist expectations - Xenochimera even have specific lore stating they contaminate sleevers.
These changes will be applied to regular clonepod + resleeving pod eventually™️
This commit is contained in:
@@ -76,6 +76,18 @@
|
||||
|
||||
var/client/ghost_client = ghost.client
|
||||
|
||||
if(!is_alien_whitelisted(ghost, 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.
|
||||
to_chat(ghost, "<span class='warning'>You are not whitelisted to spawn as this species!</span>")
|
||||
return
|
||||
|
||||
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]
|
||||
|
||||
if(chosen_species.flags && NO_SCAN) // Sanity. Prevents species like Xenochimera, Proteans, etc from rejoining the round via resleeve, as they should have their own methods of doing so already, as agreed to when you whitelist as them.
|
||||
to_chat(ghost, "<span class='warning'>This species cannot be resleeved!</span>")
|
||||
return
|
||||
|
||||
//Name matching is ugly but mind doesn't persist to look at.
|
||||
var/charjob
|
||||
var/datum/data/record/record_found
|
||||
|
||||
Reference in New Issue
Block a user