diff --git a/code/_global_vars/lists/species.dm b/code/_global_vars/lists/species.dm index 817f504f7f..3744b8dc40 100644 --- a/code/_global_vars/lists/species.dm +++ b/code/_global_vars/lists/species.dm @@ -1,7 +1,7 @@ //Languages/species/whitelist. GLOBAL_LIST_EMPTY_TYPED(all_species, /datum/species) -GLOBAL_LIST_EMPTY_TYPED(whitelisted_species, /datum/species) // Species that require a whitelist check. -GLOBAL_LIST_EMPTY_TYPED(playable_species, /datum/species) // A list of ALL playable species, whitelisted, latejoin or otherwise. +GLOBAL_LIST_EMPTY(whitelisted_species) // Species that require a whitelist check. +GLOBAL_LIST_EMPTY(playable_species) // A list of ALL playable species, whitelisted, latejoin or otherwise. GLOBAL_LIST_EMPTY_TYPED(all_languages, /datum/language) GLOBAL_LIST_INIT(language_name_conflicts, list()) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index e59216e7a9..7f6e5b6cbb 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1016,7 +1016,7 @@ var/datum/announcement/minor/admin_min_announcer = new set desc="Delay the game start/end" set name="Delay" - if(!check_rights(R_SERVER|R_EVENT)) return + if(!check_rights(R_SERVER|R_EVENT|R_ADMIN|R_MOD)) return if (SSticker.current_state >= GAME_STATE_PLAYING) // Tell the ticker to delay/resume SSticker.toggle_delay() diff --git a/code/modules/tgs_commands/vorestation.dm b/code/modules/tgs_commands/vorestation.dm index 7f90f8f118..56817a136d 100644 --- a/code/modules/tgs_commands/vorestation.dm +++ b/code/modules/tgs_commands/vorestation.dm @@ -379,7 +379,7 @@ GLOBAL_LIST_EMPTY(pending_discord_registrations) real_target.dust() return "Smite [smite_name] sent!" -#define VALID_ACTIONS list("add", "remove", "list") +#define VALID_ACTIONS list("add", "remove", "list", "help") #define VALID_KINDS list("job", "species") #define VALID_USAGE "whitelist \[[list2text(VALID_ACTIONS, ", ")]\] \[[list2text(VALID_KINDS, ", ")]\] (role)" /datum/tgs_chat_command/whitelist @@ -438,7 +438,30 @@ GLOBAL_LIST_EMPTY(pending_discord_registrations) // Resolve the action switch(action) + if("help") + var/list/whitelist_jobs = list() + for(var/datum/job/our_job in job_master.occupations) + if(our_job.whitelist_only) + whitelist_jobs += our_job.title + message.text = "The following jobs and species have a whitelist:\nJobs: [english_list(whitelist_jobs)]]\nSpecies: [english_list(GLOB.whitelisted_species)]" + return message if("add") + if(kind == "job") + var/datum/job/job = job_master.GetJob(role) + if(!job) + message.text = "Error, invalid job entered. Check spelling and capitalization." + return message + if(!job.whitelist_only) + message.text = "Error, job \"[role]\" is not a whitelist job." + return message + if(kind == "species") + if(role in GLOB.playable_species) + message.text = "Error, invalid species entered. Check spelling and capitalization." + return message + if(!(role in GLOB.whitelisted_species)) + message.text = "Error, species \"[role]\" is not a whitelist species." + return message + var/datum/db_query/command_add = SSdbcore.NewQuery( "INSERT INTO [format_table_name("whitelist")] (ckey, kind, entry) VALUES (:ckey, :kind, :entry)", list("ckey" = ckey, "kind" = kind, "entry" = role)