mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #11858 from Heroman3003/borgtiem
Hopefully fixes borgs not earning PTO
This commit is contained in:
committed by
Chompstation Bot
parent
e6f330182b
commit
014546cb63
@@ -25,6 +25,7 @@ SUBSYSTEM_DEF(persist)
|
||||
return
|
||||
if(!resumed)
|
||||
src.currentrun = human_mob_list.Copy()
|
||||
src.currentrun += silicon_mob_list.Copy()
|
||||
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
@@ -41,9 +42,7 @@ SUBSYSTEM_DEF(persist)
|
||||
return
|
||||
continue
|
||||
|
||||
// Do not collect useless PTO
|
||||
var/department_earning = J.pto_type
|
||||
clear_unused_pto(M)
|
||||
|
||||
// Determine special PTO types and convert properly
|
||||
if(department_earning == PTO_CYBORG)
|
||||
@@ -105,12 +104,4 @@ SUBSYSTEM_DEF(persist)
|
||||
// They have a custom title, aren't crew, or someone deleted their record, so we need a fallback method.
|
||||
// Let's check the mind.
|
||||
if(M.mind && M.mind.assigned_role)
|
||||
. = job_master.GetJob(M.mind.assigned_role)
|
||||
|
||||
// This proc tries makes sure old Command PTO doesn't linger
|
||||
/datum/controller/subsystem/persist/proc/clear_unused_pto(var/mob/M)
|
||||
var/client/C = M.client
|
||||
LAZYINITLIST(C.department_hours)
|
||||
if(C.department_hours[DEPARTMENT_COMMAND])
|
||||
C.department_hours[DEPARTMENT_COMMAND] = null
|
||||
C.department_hours.Remove(DEPARTMENT_COMMAND)
|
||||
. = job_master.GetJob(M.mind.assigned_role)
|
||||
Reference in New Issue
Block a user