diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index d10c5c92808..f8c8b810e09 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -373,6 +373,7 @@ var/time_last_changed_position = 0
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
modify.assignment = temp_t
+ log_game("[key_name(usr)] has given \"[modify.registered_name]\" the custom job title \"[temp_t]\".")
else
var/list/access = list()
if(is_centcom())
@@ -390,6 +391,11 @@ var/time_last_changed_position = 0
access = jobdatum.get_access()
+ var/jobnamedata = modify.getRankAndAssignment()
+ log_game("[key_name(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".")
+ if(t1 == "Civilian")
+ message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".")
+
modify.access = access
modify.rank = t1
modify.assignment = t1
@@ -454,6 +460,9 @@ var/time_last_changed_position = 0
if("terminate")
if(is_authenticated(usr) && !target_dept)
+ var/jobnamedata = modify.getRankAndAssignment()
+ log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".")
+ message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".")
modify.assignment = "Terminated"
modify.access = list()
callHook("terminate_employee", list(modify))
@@ -471,6 +480,10 @@ var/time_last_changed_position = 0
var/datum/job/jobdatum = new /datum/job/civilian
access = jobdatum.get_access()
+ var/jobnamedata = modify.getRankAndAssignment()
+ log_game("[key_name(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Unassigned)\".")
+ message_admins("[key_name_admin(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Unassigned)\".")
+
modify.access = access
modify.rank = "Civilian"
modify.assignment = "Unassigned"
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 2c080cdafcc..81dfd49acc9 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -187,6 +187,14 @@
/obj/item/weapon/card/id/GetID()
return src
+/obj/item/weapon/card/id/proc/getRankAndAssignment()
+ var/jobnamedata = ""
+ if(rank)
+ jobnamedata += rank
+ if(rank != assignment)
+ jobnamedata += " (" + assignment + ")"
+ return jobnamedata
+
/obj/item/weapon/card/id/proc/is_untrackable()
return untrackable
diff --git a/code/modules/modular_computers/file_system/programs/command/card.dm b/code/modules/modular_computers/file_system/programs/command/card.dm
index bd256d510af..9cd1797b142 100644
--- a/code/modules/modular_computers/file_system/programs/command/card.dm
+++ b/code/modules/modular_computers/file_system/programs/command/card.dm
@@ -79,7 +79,9 @@
"current_positions" = job.current_positions,
"total_positions" = job.total_positions,
"can_open" = can_open_job(job),
- "can_close" = can_close_job(job))))
+ "can_close" = can_close_job(job),
+ "can_prioritize" = can_prioritize_job(job)
+ )))
return formatted
@@ -121,6 +123,19 @@
return -1
return 0
+/datum/computer_file/program/card_mod/proc/can_prioritize_job(datum/job/job)
+ if(job)
+ if(!job_blacklisted(job))
+ if(job in job_master.prioritized_jobs)
+ return 2
+ else
+ if(job_master.prioritized_jobs.len >= 3)
+ return 0
+ if(job.total_positions <= job.current_positions)
+ return 0
+ return 1
+ return -1
+
/datum/computer_file/program/card_mod/proc/format_jobs(list/jobs)
var/obj/item/weapon/computer_hardware/card_slot/card_slot = computer.all_components[MC_CARD]
if(!card_slot || !card_slot.stored_card)
@@ -210,6 +225,7 @@
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
modify.assignment = temp_t
+ log_game("[key_name(usr)] has given \"[modify.registered_name]\" the custom job title \"[temp_t]\".")
else
var/list/access = list()
if(is_centcom)
@@ -227,6 +243,11 @@
access = jobdatum.get_access()
+ var/jobnamedata = modify.getRankAndAssignment()
+ log_game("[key_name(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".")
+ if(t1 == "Civilian")
+ message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".")
+
modify.access = access
modify.assignment = t1
modify.rank = t1
@@ -287,9 +308,11 @@
if("PRG_terminate")
if(is_authenticated(usr))
+ var/jobnamedata = modify.getRankAndAssignment()
+ log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".")
+ message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".")
modify.assignment = "Terminated"
modify.access = list()
-
callHook("terminate_employee", list(modify))
if("PRG_make_job_available")
@@ -323,6 +346,26 @@
opened_positions[edit_job_target]--
log_game("[key_name(usr)] has closed a job slot for job \"[j]\".")
+
+ if("PRG_prioritize_job")
+ // TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY
+ if(is_authenticated(usr))
+ var/priority_target = href_list["job"]
+ var/datum/job/j = job_master.GetJob(priority_target)
+ if(!j)
+ return 0
+ // Unlike the proper ID computer, this does not check job_in_department
+ var/priority = TRUE
+ if(j in job_master.prioritized_jobs)
+ job_master.prioritized_jobs -= j
+ priority = FALSE
+ else if(job_master.prioritized_jobs.len < 3)
+ job_master.prioritized_jobs += j
+ else
+ return 0
+ log_game("[key_name(usr)] [priority ? "prioritized" : "unprioritized"] the job \"[j.title]\".")
+ playsound(computer.loc, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
+
if(modify)
modify.name = text("[modify.registered_name]'s ID Card ([modify.assignment])")
diff --git a/nano/templates/card_prog.tmpl b/nano/templates/card_prog.tmpl
index 56c913a9de9..478c8f6b400 100644
--- a/nano/templates/card_prog.tmpl
+++ b/nano/templates/card_prog.tmpl
@@ -41,6 +41,7 @@
{{:value.title}}: {{:value.current_positions}}/{{:value.total_positions}}
{{:helper.link('-', null, {'action' : 'PRG_make_job_unavailable', 'job' : value.title}, value.can_close == 1 && data.authenticated ? null : 'disabled')}}
{{:helper.link('+', null, {'action' : 'PRG_make_job_available', 'job' : value.title}, value.can_open == 1 && data.authenticated ? null : 'disabled')}}
+ {{:helper.link('Pri', null, {'action' : 'PRG_prioritize_job', 'job' : value.title}, value.can_prioritize > 0 && data.authenticated ? null : 'disabled')}} {{if value.can_prioritize == 2}}Priority Job {{/if}}
{{/for}}
diff --git a/nano/templates/identification_computer.tmpl b/nano/templates/identification_computer.tmpl
index d7696b8630e..ad2779f7864 100644
--- a/nano/templates/identification_computer.tmpl
+++ b/nano/templates/identification_computer.tmpl
@@ -41,7 +41,7 @@
{{:value.title}}: {{:value.current_positions}}/{{:value.total_positions}}
{{:helper.link('-', null, {'choice' : 'make_job_unavailable', 'job' : value.title}, value.can_close == 1 && data.authenticated ? null : 'disabled')}}
{{:helper.link('+', null, {'choice' : 'make_job_available', 'job' : value.title}, value.can_open == 1 && data.authenticated ? null : 'disabled')}}
- {{:helper.link('*', null, {'choice' : 'prioritize_job', 'job' : value.title}, value.can_prioritize > 0 && data.authenticated ? null : 'disabled')}} {{if value.can_prioritize == 2}}Priority Job {{/if}}
+ {{:helper.link('Pri', null, {'choice' : 'prioritize_job', 'job' : value.title}, value.can_prioritize > 0 && data.authenticated ? null : 'disabled')}} {{if value.can_prioritize == 2}}Priority Job {{/if}}
{{/for}}