From 11698b62d73bcf298ae19faf8fc74004821934d2 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Mon, 9 Dec 2024 23:12:56 +0300 Subject: [PATCH 01/14] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B4=D0=BE=D0=BB?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=BE=20=D0=BD=D0=B0?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B0=D0=BC=20=D0=A1=D1=83?= =?UTF-8?q?=D1=80=D1=8B=20=D0=B8=20=D0=BF=D1=80=D0=B5=D0=B4=D0=BB=D0=BE?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=D0=BC=20=D0=9C=D0=B0=D0=BA=D1=81?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/modules/client/preference/character.dm | 3 ++ config/example/config.toml | 57 +++++++++++++++++++++ modular_ss220/jobs/_jobs.dme | 1 + modular_ss220/jobs/code/configuration.dm | 8 +++ modular_ss220/jobs/code/jobs.dm | 13 +++++ 5 files changed, 82 insertions(+) create mode 100644 modular_ss220/jobs/code/configuration.dm diff --git a/code/modules/client/preference/character.dm b/code/modules/client/preference/character.dm index 0c195ed001d6..36149480f67a 100644 --- a/code/modules/client/preference/character.dm +++ b/code/modules/client/preference/character.dm @@ -2084,6 +2084,9 @@ if(restrictions) html += "[rank] \[[restrictions]]" continue + if(job.species_ban(user.client)) + html += "[rank] \[WRONG SPECIES\]" + continue if(job.barred_by_disability(user.client)) html += "[rank] \[DISABILITY\]" continue diff --git a/config/example/config.toml b/config/example/config.toml index 0968ca0a6e49..b96e0df1a7b6 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -517,6 +517,63 @@ job_slot_amounts = [ { name = "Assistant", lowpop = -1, highpop = -1 }, ] +# Should enable job ban for species +allow_to_ban_job_for_species = false +# Job blacklist marks. Add specie name to ban job for a specific specie. Example: { name = "Captain", species_blacklist = ["Vox"] }, +job_species_blacklist = [ + # Commmand + { name = "Captain", species_blacklist = [] }, + { name = "Head of Personnel", species_blacklist = [] }, + { name = "Head of Security", species_blacklist = [] }, + { name = "Chief Engineer", species_blacklist = [] }, + { name = "Research Director", species_blacklist = [] }, + { name = "Chief Medical Officer", species_blacklist = [] }, + { name = "Quartermaster", species_blacklist = [] }, + { name = "Nanotrasen Representative", species_blacklist = [] }, + { name = "Blueshield", species_blacklist = [] }, + { name = "Magistrate", species_blacklist = [] }, + # Engineering + { name = "Life Support Specialist", species_blacklist = [] }, + { name = "Station Engineer", species_blacklist = [] }, + { name = "Trainee Engineer", species_blacklist = [] }, + # Medical + { name = "Chemist", species_blacklist = [] }, + { name = "Paramedic", species_blacklist = [] }, + { name = "Geneticist", species_blacklist = [] }, + { name = "Coroner", species_blacklist = [] }, + { name = "Psychiatrist", species_blacklist = [] }, + { name = "Medical Doctor", species_blacklist = [] }, + { name = "Medical Intern", species_blacklist = [] }, + { name = "Virologist", species_blacklist = [] }, + # Science + { name = "Roboticist", species_blacklist = [] }, + { name = "Scientist", species_blacklist = [] }, + { name = "Student Scientist", species_blacklist = [] }, + # Security + { name = "Detective", species_blacklist = [] }, + { name = "Security Officer", species_blacklist = [] }, + { name = "Security Cadet", species_blacklist = [] }, + { name = "Warden", species_blacklist = [] }, + { name = "Internal Affairs Agent", species_blacklist = [] }, + # Service + { name = "Bartender", species_blacklist = [] }, + { name = "Botanist", species_blacklist = [] }, + { name = "Chaplain", species_blacklist = [] }, + { name = "Chef", species_blacklist = [] }, + { name = "Janitor", species_blacklist = [] }, + { name = "Librarian", species_blacklist = [] }, + { name = "Clown", species_blacklist = [] }, + { name = "Mime", species_blacklist = [] }, + # Cargo/Supply + { name = "Explorer", species_blacklist = [] }, + { name = "Shaft Miner", species_blacklist = [] }, + { name = "Cargo Technician", species_blacklist = [] }, + # Silicon + { name = "AI", species_blacklist = [] }, + { name = "Cyborg", species_blacklist = [] }, + # Misc + { name = "Assistant", species_blacklist = [] }, +] ################################################################ diff --git a/modular_ss220/jobs/_jobs.dme b/modular_ss220/jobs/_jobs.dme index 52d6ceb3d615..6fee07d5919d 100644 --- a/modular_ss220/jobs/_jobs.dme +++ b/modular_ss220/jobs/_jobs.dme @@ -1,5 +1,6 @@ #include "_jobs.dm" +#include "code/configuration.dm" #include "code/card_computer.dm" #include "code/card_id.dm" #include "code/departaments.dm" diff --git a/modular_ss220/jobs/code/configuration.dm b/modular_ss220/jobs/code/configuration.dm new file mode 100644 index 000000000000..2676b4142378 --- /dev/null +++ b/modular_ss220/jobs/code/configuration.dm @@ -0,0 +1,8 @@ +/datum/configuration_section/job_configuration + var/list/blacklist_species = list() + var/enable_black_list = FALSE + +/datum/configuration_section/job_configuration/load_data(list/data) + . = .. () + CONFIG_LOAD_BOOL(enable_black_list, data["allow_to_ban_job_for_species"]) + CONFIG_LOAD_LIST(blacklist_species, data["job_species_blacklist"]) diff --git a/modular_ss220/jobs/code/jobs.dm b/modular_ss220/jobs/code/jobs.dm index e4c87cd2fe29..811b0eee75fa 100644 --- a/modular_ss220/jobs/code/jobs.dm +++ b/modular_ss220/jobs/code/jobs.dm @@ -114,3 +114,16 @@ if(title in GLOB.all_jobs_ss220) return TRUE return FALSE + +/datum/job/proc/species_ban(client/C) + if(!GLOB.configuration.jobs.enable_black_list) + return FALSE + + var/list/job_ban = GLOB.configuration.jobs.blacklist_species.Copy() + + if(!C || !length(job_ban)) + return FALSE + for(var/job_data in job_ban) + if((src.title == job_data["name"]) && (C.prefs.active_character.species in job_data["species_blacklist"])) + return TRUE + return FALSE From 142ba053b6dfe9f5384bdecebdd0ad274defbf43 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Mon, 9 Dec 2024 23:34:29 +0300 Subject: [PATCH 02/14] =?UTF-8?q?=D0=9E=D0=B3=D1=80=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BD=D0=B0=20=D0=BB=D0=B5?= =?UTF-8?q?=D0=B9=D1=82-=D0=B4=D0=B6=D0=BE=D0=B8=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/modules/client/preference/character.dm | 4 +++- code/modules/mob/new_player/new_player.dm | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/client/preference/character.dm b/code/modules/client/preference/character.dm index 36149480f67a..1196cf946cbc 100644 --- a/code/modules/client/preference/character.dm +++ b/code/modules/client/preference/character.dm @@ -2084,9 +2084,11 @@ if(restrictions) html += "[rank] \[[restrictions]]" continue + // SS220 EDIT START - RACE/JOB BANS if(job.species_ban(user.client)) - html += "[rank] \[WRONG SPECIES\]" + html += "[rank] \[SPECIES BLOCK\]" continue + // SS220 EDIT END - RACE/JOB BANS if(job.barred_by_disability(user.client)) html += "[rank] \[DISABILITY\]" continue diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index c3a043807110..faa90e211808 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -289,6 +289,10 @@ return FALSE if(job.get_exp_restrictions(client)) return FALSE + // SS220 EDIT START - RACE/JOB BANS + if(job.species_ban(client)) + return FALSE + // SS220 EDIT END - RACE/JOB BANS if(GLOB.configuration.jobs.assistant_limit) if(job.title == "Assistant") From 2634c1224322635a3c6b184a1d41e6b87f72c6fb Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 16:04:40 +0300 Subject: [PATCH 03/14] =?UTF-8?q?=D0=9E=D1=82=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B0=20=D0=BF=D0=BE=20=D1=80=D0=B5=D0=B2=D1=8C?= =?UTF-8?q?=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/modules/mob/new_player/new_player.dm | 4 - config/example/config.toml | 152 +++++++++++++--------- modular_ss220/jobs/code/configuration.dm | 28 +++- modular_ss220/jobs/code/jobs.dm | 14 +- 4 files changed, 129 insertions(+), 69 deletions(-) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index faa90e211808..c3a043807110 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -289,10 +289,6 @@ return FALSE if(job.get_exp_restrictions(client)) return FALSE - // SS220 EDIT START - RACE/JOB BANS - if(job.species_ban(client)) - return FALSE - // SS220 EDIT END - RACE/JOB BANS if(GLOB.configuration.jobs.assistant_limit) if(job.title == "Assistant") diff --git a/config/example/config.toml b/config/example/config.toml index b96e0df1a7b6..fa36a1d21efc 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -517,64 +517,6 @@ job_slot_amounts = [ { name = "Assistant", lowpop = -1, highpop = -1 }, ] -# Should enable job ban for species -allow_to_ban_job_for_species = false -# Job blacklist marks. Add specie name to ban job for a specific specie. Example: { name = "Captain", species_blacklist = ["Vox"] }, -job_species_blacklist = [ - # Commmand - { name = "Captain", species_blacklist = [] }, - { name = "Head of Personnel", species_blacklist = [] }, - { name = "Head of Security", species_blacklist = [] }, - { name = "Chief Engineer", species_blacklist = [] }, - { name = "Research Director", species_blacklist = [] }, - { name = "Chief Medical Officer", species_blacklist = [] }, - { name = "Quartermaster", species_blacklist = [] }, - { name = "Nanotrasen Representative", species_blacklist = [] }, - { name = "Blueshield", species_blacklist = [] }, - { name = "Magistrate", species_blacklist = [] }, - # Engineering - { name = "Life Support Specialist", species_blacklist = [] }, - { name = "Station Engineer", species_blacklist = [] }, - { name = "Trainee Engineer", species_blacklist = [] }, - # Medical - { name = "Chemist", species_blacklist = [] }, - { name = "Paramedic", species_blacklist = [] }, - { name = "Geneticist", species_blacklist = [] }, - { name = "Coroner", species_blacklist = [] }, - { name = "Psychiatrist", species_blacklist = [] }, - { name = "Medical Doctor", species_blacklist = [] }, - { name = "Medical Intern", species_blacklist = [] }, - { name = "Virologist", species_blacklist = [] }, - # Science - { name = "Roboticist", species_blacklist = [] }, - { name = "Scientist", species_blacklist = [] }, - { name = "Student Scientist", species_blacklist = [] }, - # Security - { name = "Detective", species_blacklist = [] }, - { name = "Security Officer", species_blacklist = [] }, - { name = "Security Cadet", species_blacklist = [] }, - { name = "Warden", species_blacklist = [] }, - { name = "Internal Affairs Agent", species_blacklist = [] }, - # Service - { name = "Bartender", species_blacklist = [] }, - { name = "Botanist", species_blacklist = [] }, - { name = "Chaplain", species_blacklist = [] }, - { name = "Chef", species_blacklist = [] }, - { name = "Janitor", species_blacklist = [] }, - { name = "Librarian", species_blacklist = [] }, - { name = "Clown", species_blacklist = [] }, - { name = "Mime", species_blacklist = [] }, - # Cargo/Supply - { name = "Explorer", species_blacklist = [] }, - { name = "Shaft Miner", species_blacklist = [] }, - { name = "Cargo Technician", species_blacklist = [] }, - # Silicon - { name = "AI", species_blacklist = [] }, - { name = "Cyborg", species_blacklist = [] }, - # Misc - { name = "Assistant", species_blacklist = [] }, -] - ################################################################ @@ -1218,3 +1160,97 @@ tag = "vox_raiders" "candidates_required" = 2 ################################################################ + +[job_configuration_restriction] + +# Should enable job ban for species +allow_to_ban_job_for_species = false + +# Job blacklist marks. Add species name to ban job for a specific species. Example: { name = "Captain", species_blacklist = ["Vox"] }, +job_species_blacklist = [ + # Cental Command + { name = "Nanotrasen Navy Officer", species_blacklist = [] }, + { name = "Special Operations Officer", species_blacklist = [] }, + { name = "Trans-Solar Federation General", species_blacklist = [] }, + { name = "Solar Federation General", species_blacklist = [] }, + { name = "Syndicate Officer", species_blacklist = [] }, + # Commmand + { name = "Captain", species_blacklist = [] }, + { name = "Head of Personnel", species_blacklist = [] }, + { name = "Head of Security", species_blacklist = [] }, + { name = "Chief Engineer", species_blacklist = [] }, + { name = "Research Director", species_blacklist = [] }, + { name = "Chief Medical Officer", species_blacklist = [] }, + { name = "Quartermaster", species_blacklist = [] }, + { name = "Nanotrasen Representative", species_blacklist = [] }, + { name = "Blueshield", species_blacklist = [] }, + { name = "Magistrate", species_blacklist = [] }, + # Engineering + { name = "Life Support Specialist", species_blacklist = [] }, + { name = "Station Engineer", species_blacklist = [] }, + { name = "Trainee Engineer", species_blacklist = [] }, + # Medical + { name = "Chemist", species_blacklist = [] }, + { name = "Paramedic", species_blacklist = [] }, + { name = "Geneticist", species_blacklist = [] }, + { name = "Coroner", species_blacklist = [] }, + { name = "Psychiatrist", species_blacklist = [] }, + { name = "Medical Doctor", species_blacklist = [] }, + { name = "Medical Intern", species_blacklist = [] }, + { name = "Virologist", species_blacklist = [] }, + # Science + { name = "Roboticist", species_blacklist = [] }, + { name = "Scientist", species_blacklist = [] }, + { name = "Student Scientist", species_blacklist = [] }, + # Security + { name = "Detective", species_blacklist = [] }, + { name = "Security Officer", species_blacklist = [] }, + { name = "Security Cadet", species_blacklist = [] }, + { name = "Warden", species_blacklist = [] }, + { name = "Internal Affairs Agent", species_blacklist = [] }, + # Service + { name = "Bartender", species_blacklist = [] }, + { name = "Botanist", species_blacklist = [] }, + { name = "Chaplain", species_blacklist = [] }, + { name = "Chef", species_blacklist = [] }, + { name = "Janitor", species_blacklist = [] }, + { name = "Librarian", species_blacklist = [] }, + { name = "Clown", species_blacklist = [] }, + { name = "Mime", species_blacklist = [] }, + # Cargo/Supply + { name = "Explorer", species_blacklist = [] }, + { name = "Shaft Miner", species_blacklist = [] }, + { name = "Cargo Technician", species_blacklist = [] }, + # Silicon + { name = "AI", species_blacklist = [] }, + { name = "Cyborg", species_blacklist = [] }, + # Misc + { name = "Assistant", species_blacklist = [] }, + # Donor + { name = "Donor", species_blacklist = [] }, + { name = "Prisoner", species_blacklist = [] }, + { name = "Barber", species_blacklist = [] }, + { name = "Bath", species_blacklist = [] }, + { name = "Casino", species_blacklist = [] }, + { name = "Waiter", species_blacklist = [] }, + { name = "Acolyte", species_blacklist = [] }, + { name = "Wrestler", species_blacklist = [] }, + { name = "Musician", species_blacklist = [] }, + { name = "Actor", species_blacklist = [] }, + { name = "Administrator", species_blacklist = [] }, + { name = "Tourist TSF", species_blacklist = [] }, + { name = "Tourist USSP", species_blacklist = [] }, + { name = "Cleaning Manager", species_blacklist = [] }, + { name = "Guard", species_blacklist = [] }, + { name = "Migrant", species_blacklist = [] }, + { name = "Uncertain", species_blacklist = [] }, + { name = "Adjutant", species_blacklist = [] }, + { name = "Representative TSF", species_blacklist = [] }, + { name = "Representative USSP", species_blacklist = [] }, + { name = "Dealer", species_blacklist = [] }, + { name = "VIP Corporate Guest", species_blacklist = [] }, + { name = "Banker", species_blacklist = [] }, + { name = "Security Clown", species_blacklist = [] }, +] + +################################################################ diff --git a/modular_ss220/jobs/code/configuration.dm b/modular_ss220/jobs/code/configuration.dm index 2676b4142378..2c8edd7baad7 100644 --- a/modular_ss220/jobs/code/configuration.dm +++ b/modular_ss220/jobs/code/configuration.dm @@ -1,8 +1,30 @@ -/datum/configuration_section/job_configuration +/datum/configuration_section/job_configuration_restriction var/list/blacklist_species = list() var/enable_black_list = FALSE -/datum/configuration_section/job_configuration/load_data(list/data) - . = .. () +/datum/server_configuration + var/datum/configuration_section/job_configuration_restriction/jobs_restrict + +/datum/configuration_section/job_configuration_restriction/load_data(list/data) CONFIG_LOAD_BOOL(enable_black_list, data["allow_to_ban_job_for_species"]) CONFIG_LOAD_LIST(blacklist_species, data["job_species_blacklist"]) + +/datum/configuration_section/job_configuration_restriction/proc/sanitize_job_checks() + if(!SSjobs) + return + + var/list/name_list = list() + for(var/job_info in blacklist_species) + name_list += job_info["name"] + + var/list/all_jobs = SSjobs.name_occupations + for(var/check_job in all_jobs) + if(check_job in name_list) + continue + else + CRASH("[check_job] job not found in config block job_configuration_restriction") + +/datum/server_configuration/load_all_sections() + . = ..() + jobs_restrict = new() + safe_load(jobs_restrict, "job_configuration_restriction") diff --git a/modular_ss220/jobs/code/jobs.dm b/modular_ss220/jobs/code/jobs.dm index 811b0eee75fa..2e06c98c143a 100644 --- a/modular_ss220/jobs/code/jobs.dm +++ b/modular_ss220/jobs/code/jobs.dm @@ -116,14 +116,20 @@ return FALSE /datum/job/proc/species_ban(client/C) - if(!GLOB.configuration.jobs.enable_black_list) + GLOB.configuration.jobs_restrict.sanitize_job_checks() + if(!GLOB.configuration.jobs_restrict.enable_black_list) return FALSE - var/list/job_ban = GLOB.configuration.jobs.blacklist_species.Copy() - + var/list/job_ban = GLOB.configuration.jobs_restrict.blacklist_species if(!C || !length(job_ban)) return FALSE for(var/job_data in job_ban) - if((src.title == job_data["name"]) && (C.prefs.active_character.species in job_data["species_blacklist"])) + if((title == job_data["name"]) && (C.prefs.active_character.species in job_data["species_blacklist"])) return TRUE return FALSE + +/mob/new_player/IsJobAvailable(rank) + . = .. () + var/datum/job/job = SSjobs.GetJob(rank) + if(job.species_ban(client)) + return FALSE From aece8e710717355c67f00def73bafb443d8e00e5 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 16:33:17 +0300 Subject: [PATCH 04/14] =?UTF-8?q?=D0=9E=D1=82=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B0=20=D0=BF=D0=BE=20=D1=80=D0=B5=D0=B2=D1=8C?= =?UTF-8?q?=D1=8E=20-=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0?= =?UTF-8?q?=20=D1=80=D0=B0=D1=81=D1=8B,=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5?= =?UTF-8?q?=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=84=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/example/config.toml | 145 ++++++++++++----------- modular_ss220/jobs/code/configuration.dm | 22 ++-- modular_ss220/jobs/code/jobs.dm | 3 +- 3 files changed, 88 insertions(+), 82 deletions(-) diff --git a/config/example/config.toml b/config/example/config.toml index fa36a1d21efc..f3a2aa137e51 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -517,6 +517,7 @@ job_slot_amounts = [ { name = "Assistant", lowpop = -1, highpop = -1 }, ] + ################################################################ @@ -1169,88 +1170,88 @@ allow_to_ban_job_for_species = false # Job blacklist marks. Add species name to ban job for a specific species. Example: { name = "Captain", species_blacklist = ["Vox"] }, job_species_blacklist = [ # Cental Command - { name = "Nanotrasen Navy Officer", species_blacklist = [] }, - { name = "Special Operations Officer", species_blacklist = [] }, - { name = "Trans-Solar Federation General", species_blacklist = [] }, - { name = "Solar Federation General", species_blacklist = [] }, - { name = "Syndicate Officer", species_blacklist = [] }, + # { name = "Nanotrasen Navy Officer", species_blacklist = [] }, + # { name = "Special Operations Officer", species_blacklist = [] }, + # { name = "Trans-Solar Federation General", species_blacklist = [] }, + # { name = "Solar Federation General", species_blacklist = [] }, + # { name = "Syndicate Officer", species_blacklist = [] }, # Commmand - { name = "Captain", species_blacklist = [] }, - { name = "Head of Personnel", species_blacklist = [] }, - { name = "Head of Security", species_blacklist = [] }, - { name = "Chief Engineer", species_blacklist = [] }, - { name = "Research Director", species_blacklist = [] }, - { name = "Chief Medical Officer", species_blacklist = [] }, - { name = "Quartermaster", species_blacklist = [] }, - { name = "Nanotrasen Representative", species_blacklist = [] }, - { name = "Blueshield", species_blacklist = [] }, - { name = "Magistrate", species_blacklist = [] }, + { name = "Captain", species_blacklist = ["Vox"] }, + # { name = "Head of Personnel", species_blacklist = [] }, + # { name = "Head of Security", species_blacklist = [] }, + # { name = "Chief Engineer", species_blacklist = [] }, + # { name = "Research Director", species_blacklist = [] }, + # { name = "Chief Medical Officer", species_blacklist = [] }, + # { name = "Quartermaster", species_blacklist = [] }, + # { name = "Nanotrasen Representative", species_blacklist = [] }, + # { name = "Blueshield", species_blacklist = [] }, + # { name = "Magistrate", species_blacklist = [] }, # Engineering - { name = "Life Support Specialist", species_blacklist = [] }, - { name = "Station Engineer", species_blacklist = [] }, - { name = "Trainee Engineer", species_blacklist = [] }, + # { name = "Life Support Specialist", species_blacklist = [] }, + # { name = "Station Engineer", species_blacklist = [] }, + # { name = "Trainee Engineer", species_blacklist = [] }, # Medical - { name = "Chemist", species_blacklist = [] }, - { name = "Paramedic", species_blacklist = [] }, - { name = "Geneticist", species_blacklist = [] }, - { name = "Coroner", species_blacklist = [] }, - { name = "Psychiatrist", species_blacklist = [] }, - { name = "Medical Doctor", species_blacklist = [] }, - { name = "Medical Intern", species_blacklist = [] }, - { name = "Virologist", species_blacklist = [] }, + # { name = "Chemist", species_blacklist = [] }, + # { name = "Paramedic", species_blacklist = [] }, + # { name = "Geneticist", species_blacklist = [] }, + # { name = "Coroner", species_blacklist = [] }, + # { name = "Psychiatrist", species_blacklist = [] }, + # { name = "Medical Doctor", species_blacklist = [] }, + # { name = "Medical Intern", species_blacklist = [] }, + # { name = "Virologist", species_blacklist = [] }, # Science - { name = "Roboticist", species_blacklist = [] }, - { name = "Scientist", species_blacklist = [] }, - { name = "Student Scientist", species_blacklist = [] }, + # { name = "Roboticist", species_blacklist = [] }, + # { name = "Scientist", species_blacklist = [] }, + # { name = "Student Scientist", species_blacklist = [] }, # Security - { name = "Detective", species_blacklist = [] }, - { name = "Security Officer", species_blacklist = [] }, - { name = "Security Cadet", species_blacklist = [] }, - { name = "Warden", species_blacklist = [] }, - { name = "Internal Affairs Agent", species_blacklist = [] }, + # { name = "Detective", species_blacklist = [] }, + # { name = "Security Officer", species_blacklist = [] }, + # { name = "Security Cadet", species_blacklist = [] }, + # { name = "Warden", species_blacklist = [] }, + # { name = "Internal Affairs Agent", species_blacklist = [] }, # Service - { name = "Bartender", species_blacklist = [] }, - { name = "Botanist", species_blacklist = [] }, - { name = "Chaplain", species_blacklist = [] }, - { name = "Chef", species_blacklist = [] }, - { name = "Janitor", species_blacklist = [] }, - { name = "Librarian", species_blacklist = [] }, - { name = "Clown", species_blacklist = [] }, - { name = "Mime", species_blacklist = [] }, + # { name = "Bartender", species_blacklist = [] }, + # { name = "Botanist", species_blacklist = [] }, + # { name = "Chaplain", species_blacklist = [] }, + # { name = "Chef", species_blacklist = [] }, + # { name = "Janitor", species_blacklist = [] }, + # { name = "Librarian", species_blacklist = [] }, + # { name = "Clown", species_blacklist = [] }, + # { name = "Mime", species_blacklist = [] }, # Cargo/Supply - { name = "Explorer", species_blacklist = [] }, - { name = "Shaft Miner", species_blacklist = [] }, - { name = "Cargo Technician", species_blacklist = [] }, + # { name = "Explorer", species_blacklist = [] }, + # { name = "Shaft Miner", species_blacklist = [] }, + # { name = "Cargo Technician", species_blacklist = [] }, # Silicon - { name = "AI", species_blacklist = [] }, - { name = "Cyborg", species_blacklist = [] }, + # { name = "AI", species_blacklist = [] }, + # { name = "Cyborg", species_blacklist = [] }, # Misc - { name = "Assistant", species_blacklist = [] }, + # { name = "Assistant", species_blacklist = [] }, # Donor - { name = "Donor", species_blacklist = [] }, - { name = "Prisoner", species_blacklist = [] }, - { name = "Barber", species_blacklist = [] }, - { name = "Bath", species_blacklist = [] }, - { name = "Casino", species_blacklist = [] }, - { name = "Waiter", species_blacklist = [] }, - { name = "Acolyte", species_blacklist = [] }, - { name = "Wrestler", species_blacklist = [] }, - { name = "Musician", species_blacklist = [] }, - { name = "Actor", species_blacklist = [] }, - { name = "Administrator", species_blacklist = [] }, - { name = "Tourist TSF", species_blacklist = [] }, - { name = "Tourist USSP", species_blacklist = [] }, - { name = "Cleaning Manager", species_blacklist = [] }, - { name = "Guard", species_blacklist = [] }, - { name = "Migrant", species_blacklist = [] }, - { name = "Uncertain", species_blacklist = [] }, - { name = "Adjutant", species_blacklist = [] }, - { name = "Representative TSF", species_blacklist = [] }, - { name = "Representative USSP", species_blacklist = [] }, - { name = "Dealer", species_blacklist = [] }, - { name = "VIP Corporate Guest", species_blacklist = [] }, - { name = "Banker", species_blacklist = [] }, - { name = "Security Clown", species_blacklist = [] }, + # { name = "Donor", species_blacklist = [] }, + # { name = "Prisoner", species_blacklist = [] }, + # { name = "Barber", species_blacklist = [] }, + # { name = "Bath", species_blacklist = [] }, + # { name = "Casino", species_blacklist = [] }, + # { name = "Waiter", species_blacklist = [] }, + # { name = "Acolyte", species_blacklist = [] }, + # { name = "Wrestler", species_blacklist = [] }, + # { name = "Musician", species_blacklist = [] }, + # { name = "Actor", species_blacklist = [] }, + # { name = "Administrator", species_blacklist = [] }, + # { name = "Tourist TSF", species_blacklist = [] }, + # { name = "Tourist USSP", species_blacklist = [] }, + # { name = "Cleaning Manager", species_blacklist = [] }, + # { name = "Guard", species_blacklist = [] }, + # { name = "Migrant", species_blacklist = [] }, + # { name = "Uncertain", species_blacklist = [] }, + # { name = "Adjutant", species_blacklist = [] }, + # { name = "Representative TSF", species_blacklist = [] }, + # { name = "Representative USSP", species_blacklist = [] }, + # { name = "Dealer", species_blacklist = [] }, + # { name = "VIP Corporate Guest", species_blacklist = [] }, + # { name = "Banker", species_blacklist = [] }, + # { name = "Security Clown", species_blacklist = [] }, ] ################################################################ diff --git a/modular_ss220/jobs/code/configuration.dm b/modular_ss220/jobs/code/configuration.dm index 2c8edd7baad7..abc3bb017036 100644 --- a/modular_ss220/jobs/code/configuration.dm +++ b/modular_ss220/jobs/code/configuration.dm @@ -10,19 +10,23 @@ CONFIG_LOAD_LIST(blacklist_species, data["job_species_blacklist"]) /datum/configuration_section/job_configuration_restriction/proc/sanitize_job_checks() - if(!SSjobs) + if(!SSjobs || !GLOB.all_species) return - var/list/name_list = list() for(var/job_info in blacklist_species) - name_list += job_info["name"] + job_exist_in_config(job_info["name"]) + for(var/race_info in job_info["species_blacklist"]) + race_exist_in_config(race_info, job_name) - var/list/all_jobs = SSjobs.name_occupations - for(var/check_job in all_jobs) - if(check_job in name_list) - continue - else - CRASH("[check_job] job not found in config block job_configuration_restriction") +/datum/configuration_section/job_configuration_restriction/proc/job_exist_in_config(job_name) + if(job_name in SSjobs.name_occupations) + return TRUE + CRASH("[job_name] job not found in config block job_configuration_restriction") + +/datum/configuration_section/job_configuration_restriction/proc/race_exist_in_config(race_name, job_name) + if(race_name in GLOB.all_species) + return TRUE + CRASH("[race_name] in config of job_configuration_restriction for job [job_name] not found in global var of all spieces GLOB.all_species") /datum/server_configuration/load_all_sections() . = ..() diff --git a/modular_ss220/jobs/code/jobs.dm b/modular_ss220/jobs/code/jobs.dm index 2e06c98c143a..06ad8495471e 100644 --- a/modular_ss220/jobs/code/jobs.dm +++ b/modular_ss220/jobs/code/jobs.dm @@ -116,10 +116,11 @@ return FALSE /datum/job/proc/species_ban(client/C) - GLOB.configuration.jobs_restrict.sanitize_job_checks() if(!GLOB.configuration.jobs_restrict.enable_black_list) return FALSE + GLOB.configuration.jobs_restrict.sanitize_job_checks() + var/list/job_ban = GLOB.configuration.jobs_restrict.blacklist_species if(!C || !length(job_ban)) return FALSE From 695d96e14c96a264ad77633d8edc0dc3644e788a Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 16:34:39 +0300 Subject: [PATCH 05/14] =?UTF-8?q?=D0=9A=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/example/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/example/config.toml b/config/example/config.toml index f3a2aa137e51..8758d496facb 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -1176,7 +1176,7 @@ job_species_blacklist = [ # { name = "Solar Federation General", species_blacklist = [] }, # { name = "Syndicate Officer", species_blacklist = [] }, # Commmand - { name = "Captain", species_blacklist = ["Vox"] }, + # { name = "Captain", species_blacklist = [] }, # { name = "Head of Personnel", species_blacklist = [] }, # { name = "Head of Security", species_blacklist = [] }, # { name = "Chief Engineer", species_blacklist = [] }, From bc05b85430648a77d5c80cfca97f89ad7d071565 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 16:56:02 +0300 Subject: [PATCH 06/14] =?UTF-8?q?=D0=9B=D0=B8=D0=BD=D1=82=D0=B5=D1=80,=20?= =?UTF-8?q?=D0=B4=D0=BE=D1=87=D0=B8=D1=81=D1=82=D0=BA=D0=B0=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=84=D0=B8=D0=B3=D0=B0,=20=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=BE=D0=B1=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/jobs/code/configuration.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modular_ss220/jobs/code/configuration.dm b/modular_ss220/jobs/code/configuration.dm index abc3bb017036..8de830cd27c2 100644 --- a/modular_ss220/jobs/code/configuration.dm +++ b/modular_ss220/jobs/code/configuration.dm @@ -16,17 +16,17 @@ for(var/job_info in blacklist_species) job_exist_in_config(job_info["name"]) for(var/race_info in job_info["species_blacklist"]) - race_exist_in_config(race_info, job_name) + race_exist_in_config(race_info, job_info["name"]) /datum/configuration_section/job_configuration_restriction/proc/job_exist_in_config(job_name) if(job_name in SSjobs.name_occupations) return TRUE - CRASH("[job_name] job not found in config block job_configuration_restriction") + CRASH("Job [job_name] mentioned in job_configuration_restriction not found in SSjobs.name_occupations") /datum/configuration_section/job_configuration_restriction/proc/race_exist_in_config(race_name, job_name) if(race_name in GLOB.all_species) return TRUE - CRASH("[race_name] in config of job_configuration_restriction for job [job_name] not found in global var of all spieces GLOB.all_species") + CRASH("Race [race_name] mentioned in config of job_configuration_restriction for job [job_name] not found in global var of all spieces GLOB.all_species") /datum/server_configuration/load_all_sections() . = ..() From 17e6bf8010c6353aadc5eadb4f6e2515444a8eb4 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 17:29:20 +0300 Subject: [PATCH 07/14] =?UTF-8?q?=D0=92=D1=8B=D0=BD=D0=BE=D1=81=20=D1=81?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=82=D0=B0=D0=B9=D0=B7=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/jobs/code/jobs.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modular_ss220/jobs/code/jobs.dm b/modular_ss220/jobs/code/jobs.dm index 06ad8495471e..dbea6020d7f7 100644 --- a/modular_ss220/jobs/code/jobs.dm +++ b/modular_ss220/jobs/code/jobs.dm @@ -119,8 +119,6 @@ if(!GLOB.configuration.jobs_restrict.enable_black_list) return FALSE - GLOB.configuration.jobs_restrict.sanitize_job_checks() - var/list/job_ban = GLOB.configuration.jobs_restrict.blacklist_species if(!C || !length(job_ban)) return FALSE @@ -130,7 +128,11 @@ return FALSE /mob/new_player/IsJobAvailable(rank) - . = .. () + . = ..() var/datum/job/job = SSjobs.GetJob(rank) if(job.species_ban(client)) return FALSE + +/datum/controller/subsystem/jobs/Initialize() + . = ..() + GLOB.configuration.jobs_restrict.sanitize_job_checks() From 4bdc23e8e64acb4241b67e00b6732c7d5d14ae74 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 17:30:05 +0300 Subject: [PATCH 08/14] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B0=20=D0=BF=D0=BE=20=D1=80=D0=B5=D0=B2=D1=8C?= =?UTF-8?q?=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/jobs/code/configuration.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_ss220/jobs/code/configuration.dm b/modular_ss220/jobs/code/configuration.dm index 8de830cd27c2..550ef133706f 100644 --- a/modular_ss220/jobs/code/configuration.dm +++ b/modular_ss220/jobs/code/configuration.dm @@ -26,7 +26,7 @@ /datum/configuration_section/job_configuration_restriction/proc/race_exist_in_config(race_name, job_name) if(race_name in GLOB.all_species) return TRUE - CRASH("Race [race_name] mentioned in config of job_configuration_restriction for job [job_name] not found in global var of all spieces GLOB.all_species") + CRASH("Race [race_name] mentioned in config of job_configuration_restriction for job [job_name] not found in global var of all species GLOB.all_species") /datum/server_configuration/load_all_sections() . = ..() From cc05f39631e2f41822013d5a4a90e705c0e2864e Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 17:36:02 +0300 Subject: [PATCH 09/14] =?UTF-8?q?=D0=9A=D1=80=D0=B0=D1=88=20=D0=BD=D0=B0?= =?UTF-8?q?=20=D1=81=D0=BB=D1=83=D1=87=D0=B0=D0=B9=20=D0=B5=D1=81=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=BA=D0=B0=D0=BA=D0=B8=D0=BC-=D1=82=D0=BE=20=D1=87?= =?UTF-8?q?=D1=83=D0=B4=D0=BE=D0=BC=20=D0=BD=D0=B5=20=D0=B8=D0=BD=D0=B8?= =?UTF-8?q?=D1=86=D0=B8=D0=BB=D0=B8=D0=B7=D0=B8=D1=80=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=D1=81=D1=8C=20=D0=B4=D0=B6=D0=BE=D0=B1=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=B8=D0=BB=D0=B8=20=D1=81=D0=BF=D0=B8=D1=81=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=B2=D1=81=D0=B5=D1=85=20=D0=B2=D0=B8=D0=B4=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/jobs/code/configuration.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_ss220/jobs/code/configuration.dm b/modular_ss220/jobs/code/configuration.dm index 550ef133706f..d8a7d1d17b18 100644 --- a/modular_ss220/jobs/code/configuration.dm +++ b/modular_ss220/jobs/code/configuration.dm @@ -11,7 +11,7 @@ /datum/configuration_section/job_configuration_restriction/proc/sanitize_job_checks() if(!SSjobs || !GLOB.all_species) - return + CRASH("Can't check job_configuration_restriction without SSjobs and GLOB.all_species") for(var/job_info in blacklist_species) job_exist_in_config(job_info["name"]) From 7225ff878a54179a58800eb2e4c8533e9d0d1f09 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 18:51:44 +0300 Subject: [PATCH 10/14] =?UTF-8?q?=D0=B4=D0=BE=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B0=20=D0=BF=D0=BE=20=D1=80=D0=B5=D0=B2=D1=8C?= =?UTF-8?q?=D1=8E,=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/example/config.toml | 97 ++++++++++++++++----------------- modular_ss220/jobs/code/jobs.dm | 2 + 2 files changed, 50 insertions(+), 49 deletions(-) diff --git a/config/example/config.toml b/config/example/config.toml index 8758d496facb..551c7dec246a 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -1165,68 +1165,67 @@ tag = "vox_raiders" [job_configuration_restriction] # Should enable job ban for species -allow_to_ban_job_for_species = false +allow_to_ban_job_for_species = true # Job blacklist marks. Add species name to ban job for a specific species. Example: { name = "Captain", species_blacklist = ["Vox"] }, job_species_blacklist = [ # Cental Command - # { name = "Nanotrasen Navy Officer", species_blacklist = [] }, - # { name = "Special Operations Officer", species_blacklist = [] }, - # { name = "Trans-Solar Federation General", species_blacklist = [] }, - # { name = "Solar Federation General", species_blacklist = [] }, - # { name = "Syndicate Officer", species_blacklist = [] }, + { name = "Nanotrasen Navy Officer", species_blacklist = ["Unathi", "Slime People", "Vox", "Drask", "Grey", "Diona", "Machine", "Kidan", "Plasmaman", "Vulpkanin", "Nucleation", "Nian"] }, + { name = "Special Operations Officer", species_blacklist = ["Unathi", "Slime People", "Vox", "Drask", "Grey", "Diona", "Machine", "Kidan", "Plasmaman", "Vulpkanin", "Nucleation", "Nian"] }, + { name = "Trans-Solar Federation General", species_blacklist = ["Unathi", "Slime People", "Slime People", "Vox", "Drask", "Plasmaman", "Nian"] }, + { name = "Syndicate Officer", species_blacklist = [] }, # Commmand - # { name = "Captain", species_blacklist = [] }, - # { name = "Head of Personnel", species_blacklist = [] }, - # { name = "Head of Security", species_blacklist = [] }, - # { name = "Chief Engineer", species_blacklist = [] }, - # { name = "Research Director", species_blacklist = [] }, - # { name = "Chief Medical Officer", species_blacklist = [] }, - # { name = "Quartermaster", species_blacklist = [] }, - # { name = "Nanotrasen Representative", species_blacklist = [] }, - # { name = "Blueshield", species_blacklist = [] }, - # { name = "Magistrate", species_blacklist = [] }, + { name = "Captain", species_blacklist = ["Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian"] }, + { name = "Head of Personnel", species_blacklist = ["Unathi", "Diona", "Grey", "Plasmaman", "Vox", "Nian"] }, + { name = "Head of Security", species_blacklist = [ "Vox", "Slime People", "Diona", "Grey", "Kidan", "Plasmaman", "Nian", "Nucleation"] }, + { name = "Chief Engineer", species_blacklist = ["Kidan", "Vox"] }, + { name = "Research Director", species_blacklist = ["Kidan", "Slime People", "Vox"] }, + { name = "Chief Medical Officer", species_blacklist = ["Kidan"] }, + { name = "Quartermaster", species_blacklist = ["Vulpkanin", "Kidan"] }, + { name = "Nanotrasen Representative", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian"] }, + { name = "Blueshield", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian", "Nucleation"] }, + { name = "Magistrate", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian"] }, # Engineering - # { name = "Life Support Specialist", species_blacklist = [] }, - # { name = "Station Engineer", species_blacklist = [] }, - # { name = "Trainee Engineer", species_blacklist = [] }, + { name = "Life Support Specialist", species_blacklist = ["Drask"] }, + { name = "Station Engineer", species_blacklist = [] }, + { name = "Trainee Engineer", species_blacklist = [] }, # Medical - # { name = "Chemist", species_blacklist = [] }, - # { name = "Paramedic", species_blacklist = [] }, - # { name = "Geneticist", species_blacklist = [] }, - # { name = "Coroner", species_blacklist = [] }, - # { name = "Psychiatrist", species_blacklist = [] }, - # { name = "Medical Doctor", species_blacklist = [] }, - # { name = "Medical Intern", species_blacklist = [] }, - # { name = "Virologist", species_blacklist = [] }, + { name = "Chemist", species_blacklist = [] }, + { name = "Paramedic", species_blacklist = [] }, + { name = "Geneticist", species_blacklist = ["Kidan", "Plasmaman", "Drask"] }, + { name = "Coroner", species_blacklist = [] }, + { name = "Psychiatrist", species_blacklist = [] }, + { name = "Medical Doctor", species_blacklist = [] }, + { name = "Medical Intern", species_blacklist = [] }, + { name = "Virologist", species_blacklist = ["Plasmaman"] }, # Science - # { name = "Roboticist", species_blacklist = [] }, - # { name = "Scientist", species_blacklist = [] }, - # { name = "Student Scientist", species_blacklist = [] }, + { name = "Roboticist", species_blacklist = ["Diona", "Drask"] }, + { name = "Scientist", species_blacklist = ["Drask", ] }, + { name = "Student Scientist", species_blacklist = ["Drask"] }, # Security - # { name = "Detective", species_blacklist = [] }, - # { name = "Security Officer", species_blacklist = [] }, - # { name = "Security Cadet", species_blacklist = [] }, - # { name = "Warden", species_blacklist = [] }, - # { name = "Internal Affairs Agent", species_blacklist = [] }, + { name = "Detective", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman"] }, + { name = "Security Officer", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman", "Nian", "Nucleation"] }, + { name = "Security Cadet", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman", "Nucleation"] }, + { name = "Warden", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman", "Nian", "Nucleation"] }, + { name = "Internal Affairs Agent", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Vox"] }, # Service - # { name = "Bartender", species_blacklist = [] }, - # { name = "Botanist", species_blacklist = [] }, - # { name = "Chaplain", species_blacklist = [] }, - # { name = "Chef", species_blacklist = [] }, - # { name = "Janitor", species_blacklist = [] }, - # { name = "Librarian", species_blacklist = [] }, - # { name = "Clown", species_blacklist = [] }, - # { name = "Mime", species_blacklist = [] }, + { name = "Bartender", species_blacklist = [] }, + { name = "Botanist", species_blacklist = [] }, + { name = "Chaplain", species_blacklist = ["Grey"] }, + { name = "Chef", species_blacklist = ["Vox"] }, + { name = "Janitor", species_blacklist = [] }, + { name = "Librarian", species_blacklist = [] }, + { name = "Clown", species_blacklist = ["Grey"] }, + { name = "Mime", species_blacklist = ["Grey"] }, # Cargo/Supply - # { name = "Explorer", species_blacklist = [] }, - # { name = "Shaft Miner", species_blacklist = [] }, - # { name = "Cargo Technician", species_blacklist = [] }, + { name = "Explorer", species_blacklist = [] }, + { name = "Shaft Miner", species_blacklist = ["Grey", "Plasmaman", "Nian"] }, + { name = "Cargo Technician", species_blacklist = [] }, # Silicon - # { name = "AI", species_blacklist = [] }, - # { name = "Cyborg", species_blacklist = [] }, + { name = "AI", species_blacklist = [] }, + { name = "Cyborg", species_blacklist = [] }, # Misc - # { name = "Assistant", species_blacklist = [] }, + { name = "Assistant", species_blacklist = [] }, # Donor # { name = "Donor", species_blacklist = [] }, # { name = "Prisoner", species_blacklist = [] }, diff --git a/modular_ss220/jobs/code/jobs.dm b/modular_ss220/jobs/code/jobs.dm index dbea6020d7f7..54f6a420f0ef 100644 --- a/modular_ss220/jobs/code/jobs.dm +++ b/modular_ss220/jobs/code/jobs.dm @@ -129,6 +129,8 @@ /mob/new_player/IsJobAvailable(rank) . = ..() + if(!.) + return FALSE var/datum/job/job = SSjobs.GetJob(rank) if(job.species_ban(client)) return FALSE From d18820f70b082b71f53cbc05986c4acb4f38a4d3 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 18:56:29 +0300 Subject: [PATCH 11/14] =?UTF-8?q?=D0=92=D0=BE=D1=81=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D0=B0=D0=B2=D0=BB=D0=B8=D0=B2=D0=B0=D0=B5=D1=82=20=D0=B4?= =?UTF-8?q?=D0=B5=D0=B2=D1=81=D1=82=D0=B2=D0=B5=D0=BD=D0=BD=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0,=20?= =?UTF-8?q?=D0=B2=D1=8B=D0=BD=D0=BE=D1=81=D0=B8=D0=BC=20=D0=B3=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=B2=20=D1=88=D0=B0=D0=BF=D0=BA?= =?UTF-8?q?=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/example/config.toml | 95 +++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/config/example/config.toml b/config/example/config.toml index 551c7dec246a..7ac2047939e5 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -1170,62 +1170,63 @@ allow_to_ban_job_for_species = true # Job blacklist marks. Add species name to ban job for a specific species. Example: { name = "Captain", species_blacklist = ["Vox"] }, job_species_blacklist = [ # Cental Command - { name = "Nanotrasen Navy Officer", species_blacklist = ["Unathi", "Slime People", "Vox", "Drask", "Grey", "Diona", "Machine", "Kidan", "Plasmaman", "Vulpkanin", "Nucleation", "Nian"] }, - { name = "Special Operations Officer", species_blacklist = ["Unathi", "Slime People", "Vox", "Drask", "Grey", "Diona", "Machine", "Kidan", "Plasmaman", "Vulpkanin", "Nucleation", "Nian"] }, - { name = "Trans-Solar Federation General", species_blacklist = ["Unathi", "Slime People", "Slime People", "Vox", "Drask", "Plasmaman", "Nian"] }, - { name = "Syndicate Officer", species_blacklist = [] }, + # { name = "Nanotrasen Navy Officer", species_blacklist = [] }, + # { name = "Special Operations Officer", species_blacklist = [] }, + # { name = "Trans-Solar Federation General", species_blacklist = [] }, + # { name = "Solar Federation General", species_blacklist = [] }, + # { name = "Syndicate Officer", species_blacklist = [] }, # Commmand - { name = "Captain", species_blacklist = ["Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian"] }, - { name = "Head of Personnel", species_blacklist = ["Unathi", "Diona", "Grey", "Plasmaman", "Vox", "Nian"] }, - { name = "Head of Security", species_blacklist = [ "Vox", "Slime People", "Diona", "Grey", "Kidan", "Plasmaman", "Nian", "Nucleation"] }, - { name = "Chief Engineer", species_blacklist = ["Kidan", "Vox"] }, - { name = "Research Director", species_blacklist = ["Kidan", "Slime People", "Vox"] }, - { name = "Chief Medical Officer", species_blacklist = ["Kidan"] }, - { name = "Quartermaster", species_blacklist = ["Vulpkanin", "Kidan"] }, - { name = "Nanotrasen Representative", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian"] }, - { name = "Blueshield", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian", "Nucleation"] }, - { name = "Magistrate", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Slime People", "Drask", "Vox", "Nian"] }, + # { name = "Captain", species_blacklist = [] }, + # { name = "Head of Personnel", species_blacklist = [] }, + # { name = "Head of Security", species_blacklist = [] }, + # { name = "Chief Engineer", species_blacklist = [] }, + # { name = "Research Director", species_blacklist = [] }, + # { name = "Chief Medical Officer", species_blacklist = [] }, + # { name = "Quartermaster", species_blacklist = [] }, + # { name = "Nanotrasen Representative", species_blacklist = [] }, + # { name = "Blueshield", species_blacklist = [] }, + # { name = "Magistrate", species_blacklist = [] }, # Engineering - { name = "Life Support Specialist", species_blacklist = ["Drask"] }, - { name = "Station Engineer", species_blacklist = [] }, - { name = "Trainee Engineer", species_blacklist = [] }, + # { name = "Life Support Specialist", species_blacklist = [] }, + # { name = "Station Engineer", species_blacklist = [] }, + # { name = "Trainee Engineer", species_blacklist = [] }, # Medical - { name = "Chemist", species_blacklist = [] }, - { name = "Paramedic", species_blacklist = [] }, - { name = "Geneticist", species_blacklist = ["Kidan", "Plasmaman", "Drask"] }, - { name = "Coroner", species_blacklist = [] }, - { name = "Psychiatrist", species_blacklist = [] }, - { name = "Medical Doctor", species_blacklist = [] }, - { name = "Medical Intern", species_blacklist = [] }, - { name = "Virologist", species_blacklist = ["Plasmaman"] }, + # { name = "Chemist", species_blacklist = [] }, + # { name = "Paramedic", species_blacklist = [] }, + # { name = "Geneticist", species_blacklist = [] }, + # { name = "Coroner", species_blacklist = [] }, + # { name = "Psychiatrist", species_blacklist = [] }, + # { name = "Medical Doctor", species_blacklist = [] }, + # { name = "Medical Intern", species_blacklist = [] }, + # { name = "Virologist", species_blacklist = [] }, # Science - { name = "Roboticist", species_blacklist = ["Diona", "Drask"] }, - { name = "Scientist", species_blacklist = ["Drask", ] }, - { name = "Student Scientist", species_blacklist = ["Drask"] }, + # { name = "Roboticist", species_blacklist = [] }, + # { name = "Scientist", species_blacklist = [] }, + # { name = "Student Scientist", species_blacklist = [] }, # Security - { name = "Detective", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman"] }, - { name = "Security Officer", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman", "Nian", "Nucleation"] }, - { name = "Security Cadet", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman", "Nucleation"] }, - { name = "Warden", species_blacklist = ["Diona", "Kidan", "Grey", "Plasmaman", "Nian", "Nucleation"] }, - { name = "Internal Affairs Agent", species_blacklist = ["Unathi", "Vulpkanin", "Diona", "Tajaran", "Kidan", "Grey", "Plasmaman", "Vox"] }, + # { name = "Detective", species_blacklist = [] }, + # { name = "Security Officer", species_blacklist = [] }, + # { name = "Security Cadet", species_blacklist = [] }, + # { name = "Warden", species_blacklist = [] }, + # { name = "Internal Affairs Agent", species_blacklist = [] }, # Service - { name = "Bartender", species_blacklist = [] }, - { name = "Botanist", species_blacklist = [] }, - { name = "Chaplain", species_blacklist = ["Grey"] }, - { name = "Chef", species_blacklist = ["Vox"] }, - { name = "Janitor", species_blacklist = [] }, - { name = "Librarian", species_blacklist = [] }, - { name = "Clown", species_blacklist = ["Grey"] }, - { name = "Mime", species_blacklist = ["Grey"] }, + # { name = "Bartender", species_blacklist = [] }, + # { name = "Botanist", species_blacklist = [] }, + # { name = "Chaplain", species_blacklist = [] }, + # { name = "Chef", species_blacklist = [] }, + # { name = "Janitor", species_blacklist = [] }, + # { name = "Librarian", species_blacklist = [] }, + # { name = "Clown", species_blacklist = [] }, + # { name = "Mime", species_blacklist = [] }, # Cargo/Supply - { name = "Explorer", species_blacklist = [] }, - { name = "Shaft Miner", species_blacklist = ["Grey", "Plasmaman", "Nian"] }, - { name = "Cargo Technician", species_blacklist = [] }, + # { name = "Explorer", species_blacklist = [] }, + # { name = "Shaft Miner", species_blacklist = [] }, + # { name = "Cargo Technician", species_blacklist = [] }, # Silicon - { name = "AI", species_blacklist = [] }, - { name = "Cyborg", species_blacklist = [] }, + # { name = "AI", species_blacklist = [] }, + # { name = "Cyborg", species_blacklist = [] }, # Misc - { name = "Assistant", species_blacklist = [] }, + # { name = "Assistant", species_blacklist = [] }, # Donor # { name = "Donor", species_blacklist = [] }, # { name = "Prisoner", species_blacklist = [] }, From f74f5dd93d71fe05c08a8dc3575a535a6a3ac830 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 18:58:53 +0300 Subject: [PATCH 12/14] =?UTF-8?q?=D0=A0=D0=B0c=D1=81=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D1=87=D0=B8=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/example/config.toml | 146 ++++++++++++++++++------------------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/config/example/config.toml b/config/example/config.toml index 7ac2047939e5..b37dcf177de2 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -1165,93 +1165,93 @@ tag = "vox_raiders" [job_configuration_restriction] # Should enable job ban for species -allow_to_ban_job_for_species = true +allow_to_ban_job_for_species = false # Job blacklist marks. Add species name to ban job for a specific species. Example: { name = "Captain", species_blacklist = ["Vox"] }, job_species_blacklist = [ # Cental Command - # { name = "Nanotrasen Navy Officer", species_blacklist = [] }, - # { name = "Special Operations Officer", species_blacklist = [] }, - # { name = "Trans-Solar Federation General", species_blacklist = [] }, - # { name = "Solar Federation General", species_blacklist = [] }, - # { name = "Syndicate Officer", species_blacklist = [] }, + { name = "Nanotrasen Navy Officer", species_blacklist = [] }, + { name = "Special Operations Officer", species_blacklist = [] }, + { name = "Trans-Solar Federation General", species_blacklist = [] }, + { name = "Solar Federation General", species_blacklist = [] }, + { name = "Syndicate Officer", species_blacklist = [] }, # Commmand - # { name = "Captain", species_blacklist = [] }, - # { name = "Head of Personnel", species_blacklist = [] }, - # { name = "Head of Security", species_blacklist = [] }, - # { name = "Chief Engineer", species_blacklist = [] }, - # { name = "Research Director", species_blacklist = [] }, - # { name = "Chief Medical Officer", species_blacklist = [] }, - # { name = "Quartermaster", species_blacklist = [] }, - # { name = "Nanotrasen Representative", species_blacklist = [] }, - # { name = "Blueshield", species_blacklist = [] }, - # { name = "Magistrate", species_blacklist = [] }, + { name = "Captain", species_blacklist = [] }, + { name = "Head of Personnel", species_blacklist = [] }, + { name = "Head of Security", species_blacklist = [] }, + { name = "Chief Engineer", species_blacklist = [] }, + { name = "Research Director", species_blacklist = [] }, + { name = "Chief Medical Officer", species_blacklist = [] }, + { name = "Quartermaster", species_blacklist = [] }, + { name = "Nanotrasen Representative", species_blacklist = [] }, + { name = "Blueshield", species_blacklist = [] }, + { name = "Magistrate", species_blacklist = [] }, # Engineering - # { name = "Life Support Specialist", species_blacklist = [] }, - # { name = "Station Engineer", species_blacklist = [] }, - # { name = "Trainee Engineer", species_blacklist = [] }, + { name = "Life Support Specialist", species_blacklist = [] }, + { name = "Station Engineer", species_blacklist = [] }, + { name = "Trainee Engineer", species_blacklist = [] }, # Medical - # { name = "Chemist", species_blacklist = [] }, - # { name = "Paramedic", species_blacklist = [] }, - # { name = "Geneticist", species_blacklist = [] }, - # { name = "Coroner", species_blacklist = [] }, - # { name = "Psychiatrist", species_blacklist = [] }, - # { name = "Medical Doctor", species_blacklist = [] }, - # { name = "Medical Intern", species_blacklist = [] }, - # { name = "Virologist", species_blacklist = [] }, + { name = "Chemist", species_blacklist = [] }, + { name = "Paramedic", species_blacklist = [] }, + { name = "Geneticist", species_blacklist = [] }, + { name = "Coroner", species_blacklist = [] }, + { name = "Psychiatrist", species_blacklist = [] }, + { name = "Medical Doctor", species_blacklist = [] }, + { name = "Medical Intern", species_blacklist = [] }, + { name = "Virologist", species_blacklist = [] }, # Science - # { name = "Roboticist", species_blacklist = [] }, - # { name = "Scientist", species_blacklist = [] }, - # { name = "Student Scientist", species_blacklist = [] }, + { name = "Roboticist", species_blacklist = [] }, + { name = "Scientist", species_blacklist = [] }, + { name = "Student Scientist", species_blacklist = [] }, # Security - # { name = "Detective", species_blacklist = [] }, - # { name = "Security Officer", species_blacklist = [] }, - # { name = "Security Cadet", species_blacklist = [] }, - # { name = "Warden", species_blacklist = [] }, - # { name = "Internal Affairs Agent", species_blacklist = [] }, + { name = "Detective", species_blacklist = [] }, + { name = "Security Officer", species_blacklist = [] }, + { name = "Security Cadet", species_blacklist = [] }, + { name = "Warden", species_blacklist = [] }, + { name = "Internal Affairs Agent", species_blacklist = [] }, # Service - # { name = "Bartender", species_blacklist = [] }, - # { name = "Botanist", species_blacklist = [] }, - # { name = "Chaplain", species_blacklist = [] }, - # { name = "Chef", species_blacklist = [] }, - # { name = "Janitor", species_blacklist = [] }, - # { name = "Librarian", species_blacklist = [] }, - # { name = "Clown", species_blacklist = [] }, - # { name = "Mime", species_blacklist = [] }, + { name = "Bartender", species_blacklist = [] }, + { name = "Botanist", species_blacklist = [] }, + { name = "Chaplain", species_blacklist = [] }, + { name = "Chef", species_blacklist = [] }, + { name = "Janitor", species_blacklist = [] }, + { name = "Librarian", species_blacklist = [] }, + { name = "Clown", species_blacklist = [] }, + { name = "Mime", species_blacklist = [] }, # Cargo/Supply - # { name = "Explorer", species_blacklist = [] }, - # { name = "Shaft Miner", species_blacklist = [] }, - # { name = "Cargo Technician", species_blacklist = [] }, + { name = "Explorer", species_blacklist = [] }, + { name = "Shaft Miner", species_blacklist = [] }, + { name = "Cargo Technician", species_blacklist = [] }, # Silicon - # { name = "AI", species_blacklist = [] }, - # { name = "Cyborg", species_blacklist = [] }, + { name = "AI", species_blacklist = [] }, + { name = "Cyborg", species_blacklist = [] }, # Misc - # { name = "Assistant", species_blacklist = [] }, + { name = "Assistant", species_blacklist = [] }, # Donor - # { name = "Donor", species_blacklist = [] }, - # { name = "Prisoner", species_blacklist = [] }, - # { name = "Barber", species_blacklist = [] }, - # { name = "Bath", species_blacklist = [] }, - # { name = "Casino", species_blacklist = [] }, - # { name = "Waiter", species_blacklist = [] }, - # { name = "Acolyte", species_blacklist = [] }, - # { name = "Wrestler", species_blacklist = [] }, - # { name = "Musician", species_blacklist = [] }, - # { name = "Actor", species_blacklist = [] }, - # { name = "Administrator", species_blacklist = [] }, - # { name = "Tourist TSF", species_blacklist = [] }, - # { name = "Tourist USSP", species_blacklist = [] }, - # { name = "Cleaning Manager", species_blacklist = [] }, - # { name = "Guard", species_blacklist = [] }, - # { name = "Migrant", species_blacklist = [] }, - # { name = "Uncertain", species_blacklist = [] }, - # { name = "Adjutant", species_blacklist = [] }, - # { name = "Representative TSF", species_blacklist = [] }, - # { name = "Representative USSP", species_blacklist = [] }, - # { name = "Dealer", species_blacklist = [] }, - # { name = "VIP Corporate Guest", species_blacklist = [] }, - # { name = "Banker", species_blacklist = [] }, - # { name = "Security Clown", species_blacklist = [] }, + { name = "Donor", species_blacklist = [] }, + { name = "Prisoner", species_blacklist = [] }, + { name = "Barber", species_blacklist = [] }, + { name = "Bath", species_blacklist = [] }, + { name = "Casino", species_blacklist = [] }, + { name = "Waiter", species_blacklist = [] }, + { name = "Acolyte", species_blacklist = [] }, + { name = "Wrestler", species_blacklist = [] }, + { name = "Musician", species_blacklist = [] }, + { name = "Actor", species_blacklist = [] }, + { name = "Administrator", species_blacklist = [] }, + { name = "Tourist TSF", species_blacklist = [] }, + { name = "Tourist USSP", species_blacklist = [] }, + { name = "Cleaning Manager", species_blacklist = [] }, + { name = "Guard", species_blacklist = [] }, + { name = "Migrant", species_blacklist = [] }, + { name = "Uncertain", species_blacklist = [] }, + { name = "Adjutant", species_blacklist = [] }, + { name = "Representative TSF", species_blacklist = [] }, + { name = "Representative USSP", species_blacklist = [] }, + { name = "Dealer", species_blacklist = [] }, + { name = "VIP Corporate Guest", species_blacklist = [] }, + { name = "Banker", species_blacklist = [] }, + { name = "Security Clown", species_blacklist = [] }, ] ################################################################ From 464ce682b030632f10f4e544c55351217e73a083 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 10 Dec 2024 19:00:03 +0300 Subject: [PATCH 13/14] =?UTF-8?q?=D0=A3=D0=BF=D1=81,=20=D0=B7=D0=B0=D0=B1?= =?UTF-8?q?=D1=8B=D0=BB=20=D0=B3=D0=B5=D0=BD=D0=B5=D1=80=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/example/config.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/example/config.toml b/config/example/config.toml index b37dcf177de2..ca62cafa4d7e 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -1173,7 +1173,6 @@ job_species_blacklist = [ { name = "Nanotrasen Navy Officer", species_blacklist = [] }, { name = "Special Operations Officer", species_blacklist = [] }, { name = "Trans-Solar Federation General", species_blacklist = [] }, - { name = "Solar Federation General", species_blacklist = [] }, { name = "Syndicate Officer", species_blacklist = [] }, # Commmand { name = "Captain", species_blacklist = [] }, From 63b62c6494b31cd224bd453bc58054ee16bd35ec Mon Sep 17 00:00:00 2001 From: KageIIte Date: Wed, 11 Dec 2024 12:16:06 +0300 Subject: [PATCH 14/14] =?UTF-8?q?=D0=9B=D0=B8=D0=BD=D1=82=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/example/config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/example/config.toml b/config/example/config.toml index 32ad025d8243..0f3cdf9abd87 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -1259,5 +1259,6 @@ job_species_blacklist = [ { name = "VIP Corporate Guest", species_blacklist = [] }, { name = "Banker", species_blacklist = [] }, { name = "Security Clown", species_blacklist = [] }, +] ################################################################