Skip to content

Commit

Permalink
Now instead checks id access for squads
Browse files Browse the repository at this point in the history
  • Loading branch information
someone543 committed Dec 22, 2024
1 parent 31bfd02 commit 8871d31
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions nsv13/code/modules/jobs/job_types/marine/midshipman.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ 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
Expand Down Expand Up @@ -76,7 +75,7 @@ Marine & all their unique stuff!
var/department = M?.client?.prefs?.active_character?.preferred_security_department
if(department == "None")
to_chat(M, "<b>You have not been assigned to any department. Help in any way you can!</b>")
assign_squad = TRUE
return
else if(!(department in GLOB.available_depts))
department = pick(GLOB.available_depts)

Expand All @@ -88,7 +87,6 @@ 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)
Expand All @@ -101,7 +99,6 @@ 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)
Expand All @@ -121,6 +118,14 @@ Marine & all their unique stuff!
to_chat(M, "<b>You have been assigned to [department]!</b>")

/datum/job/assistant/register_squad(mob/living/H)
if(assign_squad == FALSE)
if(!ishuman(H))
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/mob/living/carbon/human/A = H
var/obj/item/card/id/I = A.get_idcard()
if(!I)
return
for(var/B in disallowed_access)
if(B in I.access)
return
. = ..()

0 comments on commit 8871d31

Please sign in to comment.