From a86fba943a34e076598561a0a052fcf10bb761f2 Mon Sep 17 00:00:00 2001 From: Rykka Date: Sat, 26 Mar 2022 21:49:28 -0600 Subject: [PATCH 1/2] 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:tm: --- code/modules/resleeving/autoresleever.dm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/modules/resleeving/autoresleever.dm b/code/modules/resleeving/autoresleever.dm index 0ea65aa305..ce5cb0d307 100644 --- a/code/modules/resleeving/autoresleever.dm +++ b/code/modules/resleeving/autoresleever.dm @@ -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, "You are not whitelisted to spawn as this species!") + 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, "This species cannot be resleeved!") + return + //Name matching is ugly but mind doesn't persist to look at. var/charjob var/datum/data/record/record_found From c230fe12ef9e07ee8f0441adbaea05b46b6a4ec7 Mon Sep 17 00:00:00 2001 From: Rykka Date: Sat, 26 Mar 2022 23:36:36 -0600 Subject: [PATCH 2/2] Requested Changes, disables the NO_SCAN check. --- code/modules/resleeving/autoresleever.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/resleeving/autoresleever.dm b/code/modules/resleeving/autoresleever.dm index ce5cb0d307..3b71aae2a8 100644 --- a/code/modules/resleeving/autoresleever.dm +++ b/code/modules/resleeving/autoresleever.dm @@ -80,6 +80,7 @@ to_chat(ghost, "You are not whitelisted to spawn as this species!") return + /* // Comments out NO_SCAN restriction, as per headmin/maintainer request. 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] @@ -87,6 +88,7 @@ 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, "This species cannot be resleeved!") return + */ //Name matching is ugly but mind doesn't persist to look at. var/charjob