From 2544d1cf1ffd9ef283718874df18280045629dc9 Mon Sep 17 00:00:00 2001 From: someone543 <95106800+someone543@users.noreply.github.com> Date: Sat, 4 Jan 2025 00:24:47 +0800 Subject: [PATCH] Allows midshipmen that are not assigned to important departments to be in squads. (#2732) --- .../modules/jobs/job_types/marine/midshipman.dm | 13 +++++++++++++ nsv13/code/modules/squads/squad_datum.dm | 3 +-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/nsv13/code/modules/jobs/job_types/marine/midshipman.dm b/nsv13/code/modules/jobs/job_types/marine/midshipman.dm index d39e00f46f0..d9254996636 100644 --- a/nsv13/code/modules/jobs/job_types/marine/midshipman.dm +++ b/nsv13/code/modules/jobs/job_types/marine/midshipman.dm @@ -116,3 +116,16 @@ Marine & all their unique stuff! W.access |= dep_access to_chat(M, "You have been assigned to [department]!") + +/datum/job/assistant/register_squad(mob/living/H) + if(!ishuman(H)) //Nope + return + + var/list/disallowed_access = list(ACCESS_ENGINE, ACCESS_MEDICAL, ACCESS_MUNITIONS) //If these departments are disallowed squads, so are the midshipmen assigned to them + var/obj/item/card/id/I = H.get_idcard() + if(!I) + return + for(var/access in disallowed_access) + if(access in I.access) + return + . = ..() diff --git a/nsv13/code/modules/squads/squad_datum.dm b/nsv13/code/modules/squads/squad_datum.dm index 4417946ab5c..3f291b6a65c 100644 --- a/nsv13/code/modules/squads/squad_datum.dm +++ b/nsv13/code/modules/squads/squad_datum.dm @@ -23,8 +23,7 @@ /datum/job/master_at_arms, /datum/job/pilot, /datum/job/munitions_tech, /datum/job/air_traffic_controller, \ /datum/job/head_of_security, /datum/job/warden, /datum/job/security_officer, \ /datum/job/chief_medical_officer, /datum/job/medical_doctor, /datum/job/paramedic, /datum/job/brig_physician, \ - /datum/job/chief_engineer, /datum/job/station_engineer, /datum/job/atmospheric_technician, \ - /datum/job/assistant) + /datum/job/chief_engineer, /datum/job/station_engineer, /datum/job/atmospheric_technician) var/list/allowed_jobs = null var/datum/component/simple_teamchat/radio_dependent/squad/squad_channel = null var/squad_channel_type