mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 17:14:47 +01:00
Respond properly to null SSjob.get_department_type (#95048)
`get_department_type` can return null if all jobs in that department are disabled. This can't happen in normal gameplay, but is being triggered in event-base, which disables everything except assistant and cyborg. This appears to be an expected invariant as job checks it within itself, and even part of the department_order console code as well.
This commit is contained in:
@@ -48,6 +48,8 @@ GLOBAL_VAR(department_cd_override)
|
||||
/datum/computer_file/program/department_order/proc/set_linked_department(datum/job_department/department)
|
||||
linked_department = department
|
||||
var/datum/job_department/linked_department_real = SSjob.get_department_type(linked_department)
|
||||
if (isnull(linked_department_real))
|
||||
return
|
||||
// Heads of staff can download
|
||||
LAZYOR(download_access, linked_department_real.head_of_staff_access)
|
||||
// Heads of staff + anyone in the dept can run it
|
||||
|
||||
Reference in New Issue
Block a user