mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
fixes bug, refactor to use consistent procs
This commit is contained in:
@@ -108,18 +108,12 @@ var/global/list/role_playtime_requirements = list(
|
||||
return 0
|
||||
if(config.use_exp_restrictions_admin_bypass && check_rights(R_ADMIN, 0, C.mob))
|
||||
return 0
|
||||
var/list/play_records = params2list(C.prefs.exp)
|
||||
var/isexempt = text2num(play_records[EXP_TYPE_EXEMPT])
|
||||
if(isexempt)
|
||||
|
||||
var/datum/job/job = job_master.GetJob(role)
|
||||
if(!job)
|
||||
return 0
|
||||
var/minimal_player_hrs = role_playtime_requirements[role]
|
||||
if(!minimal_player_hrs)
|
||||
return 0
|
||||
var/req_mins = minimal_player_hrs * 60
|
||||
var/my_exp = text2num(play_records[EXP_TYPE_CREW])
|
||||
if(!isnum(my_exp))
|
||||
return req_mins
|
||||
return max(0, req_mins - my_exp)
|
||||
return job.available_in_playtime(C)
|
||||
|
||||
|
||||
/datum/job/proc/available_in_playtime(client/C)
|
||||
if(!C)
|
||||
|
||||
Reference in New Issue
Block a user