mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +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
|
return
|
||||||
if(!resumed)
|
if(!resumed)
|
||||||
src.currentrun = human_mob_list.Copy()
|
src.currentrun = human_mob_list.Copy()
|
||||||
|
src.currentrun += silicon_mob_list.Copy()
|
||||||
|
|
||||||
//cache for sanic speed (lists are references anyways)
|
//cache for sanic speed (lists are references anyways)
|
||||||
var/list/currentrun = src.currentrun
|
var/list/currentrun = src.currentrun
|
||||||
@@ -41,9 +42,7 @@ SUBSYSTEM_DEF(persist)
|
|||||||
return
|
return
|
||||||
continue
|
continue
|
||||||
|
|
||||||
// Do not collect useless PTO
|
|
||||||
var/department_earning = J.pto_type
|
var/department_earning = J.pto_type
|
||||||
clear_unused_pto(M)
|
|
||||||
|
|
||||||
// Determine special PTO types and convert properly
|
// Determine special PTO types and convert properly
|
||||||
if(department_earning == PTO_CYBORG)
|
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.
|
// They have a custom title, aren't crew, or someone deleted their record, so we need a fallback method.
|
||||||
// Let's check the mind.
|
// Let's check the mind.
|
||||||
if(M.mind && M.mind.assigned_role)
|
if(M.mind && M.mind.assigned_role)
|
||||||
. = job_master.GetJob(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)
|
|
||||||
Reference in New Issue
Block a user