Diplomatic Bodyguards (#20733)

Adds diplomatic bodyguards, similar to aides, the consular can open this
role. The consular's gun has been given to the guard.
This commit is contained in:
Greenjoe12345
2025-07-12 23:16:05 +00:00
committed by GitHub
parent 228386bcc0
commit 6bb40a86e9
13 changed files with 606 additions and 31 deletions
+56 -2
View File
@@ -70,8 +70,9 @@
/// A blacklist of citizenships that can't be this job.
var/list/blacklisted_citizenship = list()
/// The job name of the aide slot. Used for consulars and representatives.
/// The job name of the aide and bodyguard slots. Used for consulars and representatives.
var/aide_job
var/bodyguard_job
//Only override this proc
/datum/job/proc/pre_spawn(mob/abstract/new_player/player)
@@ -282,13 +283,66 @@
*/
/mob/living/carbon/human/proc/summon_aide()
set name = "Open Aide Slot"
set desc = "Allows an aide to join you as an assistant, companion, or bodyguard."
set desc = "Allows an aide to join you as an assistant or companion."
set category = "IC"
var/datum/job/J = SSjobs.GetJob(job)
if(J.open_aide_slot(src))
remove_verb(src, /mob/living/carbon/human/proc/summon_aide)
/**
* This is the proc responsible for actually opening the bodyguard slot.
* The `bodyguard_job` on the job datum must be a valid, existing job. Blame the fact that we don't have job defines. Or singletons.
*/
/datum/job/proc/open_bodyguard_slot(mob/living/carbon/human/representative)
if(!bodyguard_job)
log_debug("Generic Open Bodyguard Slot called without an bodyguard job.")
return FALSE
if(!representative)
log_debug("Generic Open Bodyguard Slot called without a mob.")
return FALSE
var/confirm = tgui_alert(representative, "Are you sure you want to open a bodyguard slot? This can only be used once.", "Open Bodyguard Slot", list("Yes", "No"))
if(confirm != "Yes")
return FALSE
var/datum/job/J = SSjobs.GetJob(bodyguard_job)
// At this point, we add the relevant blacklists in the proc below.
post_open_bodyguard_slot(representative, J)
// Now that the blacklists are applied, open the job.
J.total_positions++
to_chat(representative, SPAN_NOTICE("A slot for a [bodyguard_job] has been opened."))
return TRUE
/**
* This proc is called when a job opens a bodyguard slot. It MUST be called manually.
* It is responsible for adding any relevant blacklists to the bodyguard job datum.
*/
/datum/job/proc/post_open_bodyguard_slot(mob/living/carbon/human/representative, datum/job/bodyguard)
return
/**
* This proc is called when a bodyguard slot is closed (cryoing or leaving the game).
* It is responsible for cleaning up existing slots and wiping any applied blacklists to the bodyguard's job datum.
*/
/datum/job/proc/close_bodyguard_slot(mob/living/carbon/human/representative, datum/job/bodyguard)
return
/**
* This is the verb you should give to a mob to allow it to summon an bodyguard.
*/
/mob/living/carbon/human/proc/summon_bodyguard()
set name = "Open Bodyguard Slot"
set desc = "Allows a bodyguard to join you to help protect you."
set category = "IC"
var/datum/job/J = SSjobs.GetJob(job)
if(J.open_bodyguard_slot(src))
remove_verb(src, /mob/living/carbon/human/proc/summon_bodyguard)
/obj/outfit/job
name = "Standard Gear"
var/base_name = null
+69 -2
View File
@@ -216,6 +216,7 @@
blacklisted_citizenship = list(CITIZENSHIP_ERIDANI, CITIZENSHIP_ELYRA_NCP, CITIZENSHIP_NONE, CITIZENSHIP_FREE_COUNCIL)
aide_job = "Diplomatic Aide"
bodyguard_job = "Diplomatic Bodyguard"
/datum/job/consular/get_outfit(mob/living/carbon/human/H, alt_title = null)
var/datum/citizenship/citizenship = SSrecords.citizenships[H.citizenship]
@@ -251,14 +252,17 @@
var/datum/citizenship/citizenship = SSrecords.citizenships[H.citizenship]
LAZYDISTINCTADD(blacklisted_citizenship, citizenship.name)
add_verb(H, /mob/living/carbon/human/proc/summon_aide)
add_verb(H, /mob/living/carbon/human/proc/summon_bodyguard)
/datum/job/consular/on_despawn(mob/living/carbon/human/H)
var/datum/citizenship/citizenship = SSrecords.citizenships[H.citizenship]
LAZYREMOVE(blacklisted_citizenship, citizenship.name)
// Handle the removal of aide blacklists and the slot.
// Handle the removal of aide/bodyguard blacklists and the slot.
var/datum/job/J = SSjobs.GetJob(aide_job)
var/datum/job/J2 = SSjobs.GetJob(bodyguard_job)
close_aide_slot(H, J)
close_bodyguard_slot(H, J2)
/datum/job/consular/post_open_aide_slot(mob/living/carbon/human/representative, datum/job/aide)
var/datum/citizenship/citizenship = SSrecords.citizenships[representative.citizenship]
@@ -267,6 +271,13 @@
else
LAZYREMOVE(aide.blacklisted_citizenship, representative.citizenship)
/datum/job/consular/post_open_bodyguard_slot(mob/living/carbon/human/representative, datum/job/bodyguard)
var/datum/citizenship/citizenship = SSrecords.citizenships[representative.citizenship]
if(citizenship.linked_citizenship) //if there's a secondary citizenship that this one should allow - e.g zo'ra and biesel
LAZYREMOVE(bodyguard.blacklisted_citizenship, citizenship.linked_citizenship)
else
LAZYREMOVE(bodyguard.blacklisted_citizenship, representative.citizenship)
/datum/job/consular/close_aide_slot(mob/living/carbon/human/representative, datum/job/aide)
var/datum/citizenship/citizenship = SSrecords.citizenships[representative.citizenship]
if(citizenship.linked_citizenship)
@@ -277,6 +288,16 @@
if(aide.total_positions > 0)
aide.total_positions--
/datum/job/consular/close_bodyguard_slot(mob/living/carbon/human/representative, datum/job/bodyguard)
var/datum/citizenship/citizenship = SSrecords.citizenships[representative.citizenship]
if(citizenship.linked_citizenship)
LAZYDISTINCTADD(bodyguard.blacklisted_citizenship, citizenship.linked_citizenship)
else
LAZYDISTINCTADD(bodyguard.blacklisted_citizenship, representative.citizenship)
if(bodyguard.total_positions > 0)
bodyguard.total_positions--
/datum/job/diplomatic_aide
title = "Diplomatic Aide"
flag = CONSULAR_ASST
@@ -323,9 +344,55 @@
/datum/job/diplomatic_aide/after_spawn(mob/living/carbon/human/H)
LAZYDISTINCTADD(blacklisted_citizenship, H.citizenship)
/datum/job/diplomatic_bodyguard
title = "Diplomatic Bodyguard"
flag = DIPLOMAT_GUARD
departments = SIMPLEDEPT(DEPARTMENT_COMMAND_SUPPORT)
department_flag = ENGSEC
faction = "Station"
total_positions = 0 //manually opened by consular
spawn_positions = 0
supervisors = "the Consular Officer"
selection_color = "#6186cf"
economic_modifier = 5
minimum_character_age = list(
SPECIES_HUMAN = 18,
SPECIES_SKRELL = 50,
SPECIES_SKRELL_AXIORI = 50
)
access = list(ACCESS_CONSULAR, ACCESS_MAINT_TUNNELS)
minimal_access = list(ACCESS_CONSULAR)
outfit = /obj/outfit/job/diplomatic_aide
blacklisted_citizenship = ALL_CITIZENSHIPS //removed based on consular citizensihp
/datum/job/diplomatic_bodyguard/get_outfit(mob/living/carbon/human/H, alt_title = null)
var/datum/citizenship/citizenship = SSrecords.citizenships[H.citizenship]
if(citizenship)
return citizenship.bodyguard_outfit
/obj/outfit/job/diplomatic_bodyguard
name = "Diplomatic Bodyguard"
jobtype = /datum/job/diplomatic_bodyguard
uniform = /obj/item/clothing/under/suit_jacket/navy
tab_pda = /obj/item/modular_computer/handheld/pda/civilian/lawyer
wristbound = /obj/item/modular_computer/handheld/wristbound/preset/pda/civilian/lawyer
tablet = /obj/item/modular_computer/handheld/preset/civilian/lawyer
shoes = /obj/item/clothing/shoes/laceup
glasses = /obj/item/clothing/glasses/sunglasses/big
headset = /obj/item/device/radio/headset/representative
bowman = /obj/item/device/radio/headset/representative/alt
double_headset = /obj/item/device/radio/headset/alt/double/command/representative
wrist_radio = /obj/item/device/radio/headset/wrist/command/representative
/datum/job/diplomatic_bodyguard/after_spawn(mob/living/carbon/human/H)
LAZYDISTINCTADD(blacklisted_citizenship, H.citizenship)
/datum/job/corporate_aide
title = "Corporate Aide"
flag = DIPLOMAT_AIDE
flag = GLOB.DIPLOMAT_AIDE
departments = SIMPLEDEPT(DEPARTMENT_COMMAND_SUPPORT)
department_flag = ENGSEC
faction = "Station"
+3 -1
View File
@@ -19,7 +19,7 @@ var/const/BRIDGE_CREW =(1<<12)
var/const/OPERATIONS_MANAGER =(1<<13)
var/const/HRA =(1<<14)
var/const/CONSULAR_ASST =(1<<15)
var/const/DIPLOMAT_AIDE =(1<<16)
var/const/DIPLOMAT_GUARD =(1<<16)
// MEDSCI
var/const/MEDSCI =(1<<1)
@@ -59,6 +59,7 @@ var/const/CONSULAR =(1<<12)
var/const/MERCHANT =(1<<13)
var/const/JOURNALIST =(1<<14)
var/const/ASSISTANT =(1<<15)
GLOBAL_VAR_CONST(DIPLOMAT_AIDE, 1<<16)
//EVENTDEPT
//This is needed because there are just not enough bitflags available across the other departments
@@ -89,6 +90,7 @@ var/list/command_support_positions = list(
"Consular Officer",
"Bridge Crew",
"Diplomatic Aide",
"Diplomatic Bodyguard",
"Corporate Aide"
)