Minor fixes to Talon playhours

This commit is contained in:
Heroman
2022-07-04 15:32:38 +10:00
parent d3c467e5e8
commit 4955759fb5
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -77,7 +77,8 @@ SUBSYSTEM_DEF(persist)
play_hours[department_earning] = wait_in_hours
// Cap it
dept_hours[department_earning] = min(config.pto_cap, dept_hours[department_earning])
if(!(J.playtime_only))
dept_hours[department_earning] = min(config.pto_cap, dept_hours[department_earning])
// Okay we figured it out, lets update database!
var/sql_ckey = sql_sanitize_text(C.ckey)
+1 -1
View File
@@ -42,7 +42,7 @@
if(C && config.use_playtime_restriction_for_jobs && dept_time_required)
var/remaining_time_needed = dept_time_required
for(var/key in C.play_hours)
if(isnum(C.play_hours[key]))
if(isnum(C.play_hours[key]) && !(key == PTO_TALON))
remaining_time_needed = max(0, remaining_time_needed - C.play_hours[key])
return remaining_time_needed
return 0