From fc80859839e1f68c9cadd7d8e5a24cfadd828f91 Mon Sep 17 00:00:00 2001 From: Funce Date: Sat, 5 Jun 2021 17:38:57 +1200 Subject: [PATCH] Bedroom Crew~ (#6117) * Bedroom Crew <3 * Part 2! <3 --- code/__DEFINES/~skyrat_defines/jobs.dm | 2 +- code/controllers/subsystem/job.dm | 14 ++++++------- code/game/machinery/computer/card.dm | 4 ++-- code/modules/jobs/job_types/_job.dm | 4 ++-- code/modules/jobs/job_types/clown.dm | 2 +- .../file_system/programs/jobmanagement.dm | 4 ++-- ...rusted_players.txt => veteran_players.txt} | 0 .../mob/living/dead/new_player/new_player.dm | 8 +++---- .../customization/__HELPERS/global_lists.dm | 2 +- .../modules/client/preferences.dm | 4 ++-- .../exp_corps/code/expeditionary_trooper.dm | 2 +- .../trusted_players/code/trusted_players.dm | 21 ------------------- .../veteran_players/code/veteran_players.dm | 21 +++++++++++++++++++ tgstation.dme | 2 +- 14 files changed, 45 insertions(+), 45 deletions(-) rename config/skyrat/{trusted_players.txt => veteran_players.txt} (100%) delete mode 100644 modular_skyrat/modules/trusted_players/code/trusted_players.dm create mode 100644 modular_skyrat/modules/veteran_players/code/veteran_players.dm diff --git a/code/__DEFINES/~skyrat_defines/jobs.dm b/code/__DEFINES/~skyrat_defines/jobs.dm index 9d49d0d1298..0a8cc2f419b 100644 --- a/code/__DEFINES/~skyrat_defines/jobs.dm +++ b/code/__DEFINES/~skyrat_defines/jobs.dm @@ -1,7 +1,7 @@ #define JOB_UNAVAILABLE_QUIRK 6 #define JOB_UNAVAILABLE_SPECIES 7 #define JOB_UNAVAILABLE_LANGUAGE 7 -#define JOB_NOT_TRUSTED 8 +#define JOB_NOT_VETERAN 8 #define SEC_RESTRICTED_QUIRKS "Blind" = TRUE, "Brain Tumor" = TRUE, "Deaf" = TRUE, "Paraplegic" = TRUE, "Mute" = TRUE, "Foreigner" = TRUE, "Pacifist" = TRUE, "Chunky Fingers" = TRUE #define HEAD_RESTRICTED_QUIRKS "Blind" = TRUE, "Deaf" = TRUE, "Mute" = TRUE, "Foreigner" = TRUE, "Chunky Fingers" = TRUE diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index cedc61a5fb8..7e41f89c90f 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -133,7 +133,7 @@ SUBSYSTEM_DEF(job) return FALSE if(!job.has_required_languages(player.client.prefs)) return FALSE - if(job.trusted_only && !is_trusted_player(player.client)) + if(job.veteran_only && !is_veteran_player(player.client)) return FALSE //SKYRAT EDIT END if(job.required_playtime_remaining(player.client)) @@ -178,8 +178,8 @@ SUBSYSTEM_DEF(job) if(!job.has_required_languages(player.client.prefs)) JobDebug("FOC job not compatible with languages, Player: [player]") continue - if(job.trusted_only && !is_trusted_player(player.client)) - JobDebug("FOC player is not trusted, Player: [player]") + if(job.veteran_only && !is_veteran_player(player.client)) + JobDebug("FOC player is not veteran, Player: [player]") //SKYRAT EDIT END if(job.required_playtime_remaining(player.client)) JobDebug("FOC player not enough xp, Player: [player]") @@ -230,8 +230,8 @@ SUBSYSTEM_DEF(job) if(!job.has_required_languages(player.client.prefs)) JobDebug("GRJ player has incompatible languages, Player: [player]") continue - if(job.trusted_only && !is_trusted_player(player.client)) - JobDebug("GRJ player is not trusted, Player: [player]") + if(job.veteran_only && !is_veteran_player(player.client)) + JobDebug("GRJ player is not veteran, Player: [player]") //SKYRAT EDIT END if(job.required_playtime_remaining(player.client)) @@ -422,8 +422,8 @@ SUBSYSTEM_DEF(job) if(!job.has_required_languages(player.client.prefs)) JobDebug("DO player has incompatible species, Player: [player], Job:[job.title]") continue - if(job.trusted_only && !is_trusted_player(player.client)) - JobDebug("DO player is not trusted, Player: [player], Job:[job.title]") + if(job.veteran_only && !is_veteran_player(player.client)) + JobDebug("DO player is not veteran, Player: [player], Job:[job.title]") continue //SKYRAT EDIT END diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 8ef1670fbf8..ff15c1717aa 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -112,7 +112,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) //Logic check for Topic() if you can open the job /obj/machinery/computer/card/proc/can_open_job(datum/job/job) if(job) - if(!job_blacklisted(job.title) && !job.trusted_only) //SKYRAT EDIT CHANGE + if(!job_blacklisted(job.title) && !job.veteran_only) //SKYRAT EDIT CHANGE if((job.total_positions <= GLOB.player_list.len * (max_relative_positions / 100))) var/delta = (world.time / 10) - GLOB.time_last_changed_position if((change_position_cooldown < delta) || (opened_positions[job.title] < 0)) @@ -124,7 +124,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) //Logic check for Topic() if you can close the job /obj/machinery/computer/card/proc/can_close_job(datum/job/job) if(job) - if(!job_blacklisted(job.title) && !job.trusted_only) //SKYRAT EDIT CHANGE + if(!job_blacklisted(job.title) && !job.veteran_only) //SKYRAT EDIT CHANGE if(job.total_positions > job.current_positions) var/delta = (world.time / 10) - GLOB.time_last_changed_position if((change_position_cooldown < delta) || (opened_positions[job.title] > 0)) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index a339da29a15..2aff119437d 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -84,8 +84,8 @@ var/list/family_heirlooms //SKYRAT EDIT ADDITION - ///Is this job trusted only? If so, then this job requires the player to be in the trusted_players.txt - var/trusted_only = FALSE + ///Is this job veteran only? If so, then this job requires the player to be in the veteran_players.txt + var/veteran_only = FALSE //SKYRAT EDIT END /datum/job/New() diff --git a/code/modules/jobs/job_types/clown.dm b/code/modules/jobs/job_types/clown.dm index 7114e327156..b5d29655904 100644 --- a/code/modules/jobs/job_types/clown.dm +++ b/code/modules/jobs/job_types/clown.dm @@ -28,7 +28,7 @@ family_heirlooms = list(/obj/item/bikehorn/golden) - trusted_only = TRUE // SKYRAT EDIT ADDITION + veteran_only = TRUE // SKYRAT EDIT ADDITION /datum/job/clown/after_spawn(mob/living/carbon/human/H, mob/M) . = ..() diff --git a/code/modules/modular_computers/file_system/programs/jobmanagement.dm b/code/modules/modular_computers/file_system/programs/jobmanagement.dm index 78efa2db225..db969623d70 100644 --- a/code/modules/modular_computers/file_system/programs/jobmanagement.dm +++ b/code/modules/modular_computers/file_system/programs/jobmanagement.dm @@ -44,7 +44,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) change_position_cooldown = CONFIG_GET(number/id_console_jobslot_delay) /datum/computer_file/program/job_management/proc/can_open_job(datum/job/job) - if(!(job?.title in blacklisted) && !job?.trusted_only) //SKRYAT EDIT CHANGE + if(!(job?.title in blacklisted) && !job?.veteran_only) //SKRYAT EDIT CHANGE if((job.total_positions <= length(GLOB.player_list) * (max_relative_positions / 100))) var/delta = (world.time / 10) - GLOB.time_last_changed_position if((change_position_cooldown < delta) || (opened_positions[job.title] < 0)) @@ -52,7 +52,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) return FALSE /datum/computer_file/program/job_management/proc/can_close_job(datum/job/job) - if(!(job?.title in blacklisted) && !job?.trusted_only) //SKRYAT EDIT CHANGE + if(!(job?.title in blacklisted) && !job?.veteran_only) //SKRYAT EDIT CHANGE if(job.total_positions > length(GLOB.player_list) * (max_relative_positions / 100)) var/delta = (world.time / 10) - GLOB.time_last_changed_position if((change_position_cooldown < delta) || (opened_positions[job.title] > 0)) diff --git a/config/skyrat/trusted_players.txt b/config/skyrat/veteran_players.txt similarity index 100% rename from config/skyrat/trusted_players.txt rename to config/skyrat/veteran_players.txt diff --git a/modular_skyrat/master_files/code/modules/mob/living/dead/new_player/new_player.dm b/modular_skyrat/master_files/code/modules/mob/living/dead/new_player/new_player.dm index 542eeb2dc9e..0e102b5c4b1 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/dead/new_player/new_player.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/dead/new_player/new_player.dm @@ -282,8 +282,8 @@ return "[jobtitle] is unavailable." if(JOB_UNAVAILABLE_BANNED) return "You are currently banned from [jobtitle]." - if(JOB_NOT_TRUSTED) - return "You need to be trusted to join as [jobtitle]." + if(JOB_NOT_VETERAN) + return "You need to be veteran to join as [jobtitle]." if(JOB_UNAVAILABLE_PLAYTIME) return "You do not have enough relevant playtime for [jobtitle]." if(JOB_UNAVAILABLE_ACCOUNTAGE) @@ -331,8 +331,8 @@ return JOB_UNAVAILABLE_SPECIES if(!job.has_required_languages(client.prefs)) return JOB_UNAVAILABLE_LANGUAGE - if(job.trusted_only && !is_trusted_player(client)) - return JOB_NOT_TRUSTED + if(job.veteran_only && !is_veteran_player(client)) + return JOB_NOT_VETERAN return JOB_AVAILABLE /mob/dead/new_player/proc/AttemptLateSpawn(rank) diff --git a/modular_skyrat/modules/customization/__HELPERS/global_lists.dm b/modular_skyrat/modules/customization/__HELPERS/global_lists.dm index a463f3aee20..e69e469f8db 100644 --- a/modular_skyrat/modules/customization/__HELPERS/global_lists.dm +++ b/modular_skyrat/modules/customization/__HELPERS/global_lists.dm @@ -7,7 +7,7 @@ make_culture_references() //We're loading donators here because it's the least intrusive way modularly load_donators() - load_trusted_players() + load_veteran_players() /proc/make_culture_references() for(var/path in subtypesof(/datum/cultural_info/culture)) diff --git a/modular_skyrat/modules/customization/modules/client/preferences.dm b/modular_skyrat/modules/customization/modules/client/preferences.dm index f4d752c100e..ccb23f5cdeb 100644 --- a/modular_skyrat/modules/customization/modules/client/preferences.dm +++ b/modular_skyrat/modules/customization/modules/client/preferences.dm @@ -1383,8 +1383,8 @@ GLOBAL_LIST_INIT(food, list( if(is_banned_from(user.ckey, rank)) HTML += "[rank] BANNED" continue - if(job.trusted_only && !is_trusted_player(user.client)) - HTML += "[rank] \[NOT TRUSTED\]" + if(job.veteran_only && !is_veteran_player(user.client)) + HTML += "[rank] \[NOT VETERAN\]" continue var/required_playtime_remaining = job.required_playtime_remaining(user.client) if(required_playtime_remaining) diff --git a/modular_skyrat/modules/exp_corps/code/expeditionary_trooper.dm b/modular_skyrat/modules/exp_corps/code/expeditionary_trooper.dm index 0bf8c3f4c16..223d6ffe11d 100644 --- a/modular_skyrat/modules/exp_corps/code/expeditionary_trooper.dm +++ b/modular_skyrat/modules/exp_corps/code/expeditionary_trooper.dm @@ -20,7 +20,7 @@ family_heirlooms = list(/obj/item/binoculars) - trusted_only = TRUE + veteran_only = TRUE /datum/job/expeditionary_trooper/after_spawn(mob/living/carbon/human/H, mob/M) . = ..() diff --git a/modular_skyrat/modules/trusted_players/code/trusted_players.dm b/modular_skyrat/modules/trusted_players/code/trusted_players.dm deleted file mode 100644 index 03ef9704f61..00000000000 --- a/modular_skyrat/modules/trusted_players/code/trusted_players.dm +++ /dev/null @@ -1,21 +0,0 @@ -#define TRUSTEDPLAYERS "[global.config.directory]/skyrat/trusted_players.txt" - -GLOBAL_LIST(trusted_players) - -/proc/load_trusted_players() - GLOB.trusted_players = list() - for(var/line in world.file2list(TRUSTEDPLAYERS)) - if(!line) - continue - if(findtextEx(line,"#",1,2)) - continue - GLOB.trusted_players[ckey(line)] = TRUE //Associative so we can check it much faster - -/proc/is_trusted_player(client/user) - if(GLOB.trusted_players[user.ckey]) - return TRUE - if(check_rights(R_ADMIN, FALSE)) - return TRUE - return FALSE - -#undef TRUSTEDPLAYERS diff --git a/modular_skyrat/modules/veteran_players/code/veteran_players.dm b/modular_skyrat/modules/veteran_players/code/veteran_players.dm new file mode 100644 index 00000000000..c6394f034cb --- /dev/null +++ b/modular_skyrat/modules/veteran_players/code/veteran_players.dm @@ -0,0 +1,21 @@ +#define VETERANPLAYERS "[global.config.directory]/skyrat/veteran_players.txt" + +GLOBAL_LIST(veteran_players) + +/proc/load_veteran_players() + GLOB.veteran_players = list() + for(var/line in world.file2list(VETERANPLAYERS)) + if(!line) + continue + if(findtextEx(line,"#",1,2)) + continue + GLOB.veteran_players[ckey(line)] = TRUE //Associative so we can check it much faster + +/proc/is_veteran_player(client/user) + if(GLOB.veteran_players[user.ckey]) + return TRUE + if(check_rights(R_ADMIN, FALSE)) + return TRUE + return FALSE + +#undef VETERANPLAYERS diff --git a/tgstation.dme b/tgstation.dme index 54f477ebf9f..2aed2eb61d0 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4409,7 +4409,7 @@ #include "modular_skyrat\modules\tribal_extended\code\weapons\sword.dm" #include "modular_skyrat\modules\trim_tokens\code\cards_ids.dm" #include "modular_skyrat\modules\trim_tokens\code\trim_tokens.dm" -#include "modular_skyrat\modules\trusted_players\code\trusted_players.dm" +#include "modular_skyrat\modules\veteran_players\code\veteran_players.dm" #include "modular_skyrat\modules\turretid\code\turret_id_system.dm" #include "modular_skyrat\modules\typing_indicator\code\mob.dm" #include "modular_skyrat\modules\verbs\code\modules\client\preferences_toggles.dm"