From 31bfd025200a886a038d6eb495677367667fedf8 Mon Sep 17 00:00:00 2001
From: someone543 <95106800+someone543@users.noreply.github.com>
Date: Tue, 17 Dec 2024 20:50:03 +0800
Subject: [PATCH] Midshipman assigned to non-essential departments get squads
---
nsv13/code/modules/jobs/job_types/marine/midshipman.dm | 10 +++++++++-
nsv13/code/modules/squads/squad_datum.dm | 3 +--
2 files changed, 10 insertions(+), 3 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..3b91a0580ad 100644
--- a/nsv13/code/modules/jobs/job_types/marine/midshipman.dm
+++ b/nsv13/code/modules/jobs/job_types/marine/midshipman.dm
@@ -21,6 +21,7 @@ Marine & all their unique stuff!
display_order = JOB_DISPLAY_ORDER_ASSISTANT
departments = DEPARTMENT_BITFLAG_SERVICE
rpg_title = "Lout"
+ var/assign_squad = FALSE //If an assigned department is not essential to the ship, they get added to a squad instead
species_outfits = list(
SPECIES_PLASMAMAN = /datum/outfit/plasmaman
@@ -75,7 +76,7 @@ Marine & all their unique stuff!
var/department = M?.client?.prefs?.active_character?.preferred_security_department
if(department == "None")
to_chat(M, "You have not been assigned to any department. Help in any way you can!")
- return
+ assign_squad = TRUE
else if(!(department in GLOB.available_depts))
department = pick(GLOB.available_depts)
@@ -87,6 +88,7 @@ Marine & all their unique stuff!
ears = /obj/item/radio/headset/headset_cargo
dep_access = list(ACCESS_MAILSORTING, ACCESS_CARGO)
accessory = /obj/item/clothing/accessory/armband/cargo
+ assign_squad = TRUE
if(SEC_DEPT_ENGINEERING)
ears = /obj/item/radio/headset/headset_eng
dep_access = list(ACCESS_CONSTRUCTION, ACCESS_ENGINE, ACCESS_AUX_BASE)
@@ -99,6 +101,7 @@ Marine & all their unique stuff!
ears = /obj/item/radio/headset/headset_sci
dep_access = list(ACCESS_RESEARCH)
accessory = /obj/item/clothing/accessory/armband/science
+ assign_squad = TRUE
if(SEC_DEPT_MUNITIONS)
ears = /obj/item/radio/headset/munitions/munitions_tech
dep_access = list(ACCESS_MUNITIONS, ACCESS_MUNITIONS_STORAGE)
@@ -116,3 +119,8 @@ 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(assign_squad == FALSE)
+ 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