ID computer demote/termination slot freedom, logging and upgrades

This commit is contained in:
Kyep
2020-04-26 17:59:54 -07:00
parent 895263a8df
commit 112baa534e
5 changed files with 63 additions and 36 deletions
+26
View File
@@ -642,6 +642,32 @@ SUBSYSTEM_DEF(jobs)
oldjobdatum.current_positions--
newjobdatum.current_positions++
/datum/controller/subsystem/jobs/proc/force_free_slot(oldtitle)
// Used when a crew ID is demoted/terminated in an ID computer.
var/datum/job/oldjobdatum = SSjobs.GetJob(oldtitle)
if(istype(oldjobdatum) && oldjobdatum.current_positions > 0)
oldjobdatum.current_positions--
/datum/controller/subsystem/jobs/proc/notify_dept_head(jobtitle, antext)
// Used to notify the department head of jobtitle X that their employee was brigged, demoted or terminated
if(!jobtitle || !antext)
return
var/datum/job/tgt_job = GetJob(jobtitle)
if(!tgt_job)
return
if(!tgt_job.department_head[1])
return
var/boss_title = tgt_job.department_head[1]
var/obj/item/pda/target_pda
for(var/obj/item/pda/check_pda in GLOB.PDAs)
if(check_pda.ownrank == boss_title)
target_pda = check_pda
if(!target_pda)
return
var/datum/data/pda/app/messenger/PM = target_pda.find_program(/datum/data/pda/app/messenger)
if(PM && PM.can_receive())
PM.notify("<b>Automated Notification: </b>\"[antext]\" (Unable to Reply)")
/datum/controller/subsystem/jobs/proc/fetch_transfer_record_html(var/centcom)
var/record_html = "<TABLE border=\"1\">"