From 940e0c67917a2bcf3f8e6d0d84934bb85f1297a8 Mon Sep 17 00:00:00 2001 From: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Date: Sat, 25 Mar 2023 14:40:06 -0700 Subject: [PATCH] [SEMI-MODULAR] Latejoin janitors can get access keys, two! (#20030) * janitor key ecks two * Update janitor_key.dm * Update janitor.dm --- code/modules/jobs/job_types/janitor.dm | 4 ++++ .../code/modules/jobs/job_types/janitor.dm | 12 ++++++++++++ tgstation.dme | 1 + 3 files changed, 17 insertions(+) create mode 100644 modular_skyrat/master_files/code/modules/jobs/job_types/janitor.dm diff --git a/code/modules/jobs/job_types/janitor.dm b/code/modules/jobs/job_types/janitor.dm index a23043c5c7f..1db17fb4cfd 100644 --- a/code/modules/jobs/job_types/janitor.dm +++ b/code/modules/jobs/job_types/janitor.dm @@ -47,10 +47,14 @@ backpack_contents += list(/obj/item/gun/ballistic/revolver) r_pocket = /obj/item/ammo_box/a357 +//SKYRAT EDIT REMOVAL BEGIN - JANITOR KEY - (Moved to modular_skyrat/master_files/code/modules/jobs/job_types/janitor.dm) +/* var/static/access_key_given = FALSE if(!access_key_given && !visuals_only) access_key_given = TRUE backpack_contents += list(/obj/item/access_key) +*/ +//SKYRAT EDIT REMOVAL END /datum/outfit/job/janitor/get_types_to_preload() . = ..() diff --git a/modular_skyrat/master_files/code/modules/jobs/job_types/janitor.dm b/modular_skyrat/master_files/code/modules/jobs/job_types/janitor.dm new file mode 100644 index 00000000000..37f05775142 --- /dev/null +++ b/modular_skyrat/master_files/code/modules/jobs/job_types/janitor.dm @@ -0,0 +1,12 @@ +#define MAX_ACCESS_KEYS 3 + +/datum/outfit/job/janitor/pre_equip(mob/living/carbon/human/human_equipper, visuals_only) + . = ..() + + var/access_keys = 0 + for(var/obj/item/access_key/jani_gear in GLOB.janitor_devices) + access_keys++ + if(access_keys < MAX_ACCESS_KEYS && !visuals_only) + backpack_contents += list(/obj/item/access_key) + +#undef MAX_ACCESS_KEYS diff --git a/tgstation.dme b/tgstation.dme index 0e6565da415..d7c38c12a43 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -5359,6 +5359,7 @@ #include "modular_skyrat\master_files\code\modules\jobs\job_types\ds2.dm" #include "modular_skyrat\master_files\code\modules\jobs\job_types\freighter_crew.dm" #include "modular_skyrat\master_files\code\modules\jobs\job_types\ghostcafe.dm" +#include "modular_skyrat\master_files\code\modules\jobs\job_types\janitor.dm" #include "modular_skyrat\master_files\code\modules\jobs\job_types\mime.dm" #include "modular_skyrat\master_files\code\modules\jobs\job_types\tarkon.dm" #include "modular_skyrat\master_files\code\modules\language\language.dm"