From d94effd1f14d32956a5c8a8927ba93afc9322600 Mon Sep 17 00:00:00 2001 From: Kyep Date: Wed, 4 Jan 2017 02:41:50 -0800 Subject: [PATCH] Formatting improvements - Improves formatting in the "check player playtime" panel, removing the awkward "bulletpoint -" at the front, making the "?" link work, and displaying "none" rather than "0h" for people with no playtime. - Improves formatting when viewing the EXP report for a player, by not showing the jobs unlocked/locked list when job locking is off (its pointless in this case: they all count as unlocked) - Fixes a (currently invisible) typo on preferences screen --- code/game/jobs/job_exp.dm | 45 ++++++++++--------- code/modules/client/preference/preferences.dm | 2 +- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/code/game/jobs/job_exp.dm b/code/game/jobs/job_exp.dm index 520b1182e49..23d217a83bc 100644 --- a/code/game/jobs/job_exp.dm +++ b/code/game/jobs/job_exp.dm @@ -7,7 +7,7 @@ return var/msg = "Playtime ReportPlaytime:
" src << browse(msg, "window=Player_playtime_check") @@ -78,29 +78,30 @@ return_text += "
  • Exempt (all jobs auto-unlocked)
  • " else if(exp_data[EXP_TYPE_LIVING] > 0) var/my_pc = num2text(round(exp_data[dep]/exp_data[EXP_TYPE_LIVING]*100)) - return_text += "
  • [dep] [get_exp_format(exp_data[dep])] ([my_pc]%)
  • " + return_text += "
  • [dep]: [get_exp_format(exp_data[dep])] ([my_pc]%)
  • " else - return_text += "
  • [dep] [get_exp_format(exp_data[dep])]
  • " + return_text += "
  • [dep]: [get_exp_format(exp_data[dep])]
  • " if(config.use_exp_restrictions_admin_bypass && check_rights(R_ADMIN, 0, mob)) - return_text += "
  • Admin (all jobs auto-unlocked)
  • " + return_text += "
  • Admin
  • " return_text += "" - var/list/jobs_locked = list() - var/list/jobs_unlocked = list() - for(var/datum/job/job in job_master.occupations) - if(job.exp_requirements && job.exp_type) - if(!job.available_in_playtime(mob.client)) - jobs_unlocked += job.title - else - var/xp_req = job.get_exp_req_amount() - jobs_locked += "[job.title] [get_exp_format(text2num(play_records[job.get_exp_req_type()]))] / [get_exp_format(xp_req)] as [job.get_exp_req_type()])" - if(jobs_unlocked.len) - return_text += "

    Jobs Unlocked:" - if(jobs_locked.len) - return_text += "

    Jobs Not Unlocked:" + if(config.use_exp_restrictions) + var/list/jobs_locked = list() + var/list/jobs_unlocked = list() + for(var/datum/job/job in job_master.occupations) + if(job.exp_requirements && job.exp_type) + if(!job.available_in_playtime(mob.client)) + jobs_unlocked += job.title + else + var/xp_req = job.get_exp_req_amount() + jobs_locked += "[job.title] ([get_exp_format(text2num(play_records[job.get_exp_req_type()]))] / [get_exp_format(xp_req)] as [job.get_exp_req_type()])" + if(jobs_unlocked.len) + return_text += "

    Jobs Unlocked:" + if(jobs_locked.len) + return_text += "

    Jobs Not Unlocked:" return return_text @@ -115,7 +116,7 @@ else if(expnum > 0) return num2text(expnum) + "m" else - return "0h" + return "none" /proc/update_exp(var/mins, var/ann = 0) if(!establish_db_connection()) diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 8f82ab7274f..bf139ee4c8b 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -596,7 +596,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts continue var/available_in_playtime = job.available_in_playtime(user.client) if(available_in_playtime) - HTML += "[rank] \[ " + get_exp_format(available_in_playtime) + " as " + job.get_exp_req_type() + "" + HTML += "[rank] \[ " + get_exp_format(available_in_playtime) + " as " + job.get_exp_req_type() + " \]" continue if(!job.player_old_enough(user.client)) var/available_in_days = job.available_in_days(user.client)