mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 02:58:45 +01:00
Merge pull request #7774 from VOREStation/aro-depthoursfix
Fix depthours for never-used departments
This commit is contained in:
@@ -25,6 +25,9 @@
|
||||
return (available_in_playhours(C) == 0)
|
||||
|
||||
/datum/job/proc/available_in_playhours(client/C)
|
||||
if(C && config.use_playtime_restriction_for_jobs && isnum(C.play_hours[pto_type]) && dept_time_required > 0)
|
||||
return max(0, dept_time_required - C.play_hours[pto_type])
|
||||
if(C && config.use_playtime_restriction_for_jobs)
|
||||
if(isnum(C.play_hours[pto_type])) // Has played that department before
|
||||
return max(0, dept_time_required - C.play_hours[pto_type])
|
||||
else // List doesn't have that entry, maybe never played, maybe invalid PTO type (you should fix that...)
|
||||
return dept_time_required // Could be 0, too, which is fine! They can play that
|
||||
return 0
|
||||
Reference in New Issue
Block a user