Merge pull request #5224 from Kyep/jobs_unlock_system

Playtime Tracking
This commit is contained in:
Crazy Lemon
2017-01-03 18:06:28 -08:00
committed by GitHub
23 changed files with 281 additions and 8 deletions
+2 -1
View File
@@ -41,7 +41,8 @@ var/global/nologevent = 0
body += "<body>Options panel for <b>[M]</b>"
if(M.client)
body += " played by <b>[M.client]</b> "
body += "\[<A href='?_src_=holder;editrights=rank;ckey=[M.ckey]'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\]"
body += "\[<A href='?_src_=holder;editrights=rank;ckey=[M.ckey]'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\] "
body += "\[<A href='?_src_=holder;getplaytimewindow=[M.UID()]'>" + M.client.get_exp_living() + "</a>\]"
if(istype(M, /mob/new_player))
body += " <B>Hasn't Entered Game</B> "
+1
View File
@@ -75,6 +75,7 @@ var/list/admin_verbs_admin = list(
/client/proc/debug_variables,
/client/proc/show_snpc_verbs,
/client/proc/reset_all_tcs, /*resets all telecomms scripts*/
/client/proc/cmd_admin_check_player_exp, /* shows players by playtime */
/client/proc/toggle_mentor_chat
)
var/list/admin_verbs_ban = list(
+9
View File
@@ -2009,6 +2009,15 @@
fax_panel(usr)
else if(href_list["getplaytimewindow"])
if(!check_rights(R_ADMIN))
return
var/mob/M = locateUID(href_list["getplaytimewindow"])
if(!M)
to_chat(usr, "ERROR: Mob not found.")
return
cmd_show_exp_panel(M.client)
else if(href_list["jumpto"])
if(!check_rights(R_ADMIN)) return
@@ -82,6 +82,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
//game-preferences
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
var/exp
var/ooccolor = "#b82e00"
var/be_special = list() //Special role selection
var/UI_style = "Midnight"
@@ -593,6 +594,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(jobban_isbanned(user, rank))
HTML += "<del>[rank]</del></td><td><b> \[BANNED]</b></td></tr>"
continue
var/available_in_playtime = job.available_in_playtime(user.client)
if(available_in_playtime)
HTML += "<del>[rank]</del></td><td> \[ " + get_exp_format(available_in_playtime) + " as " + job.get_exp_req_type() + "</td></tr>"
continue
if(!job.player_old_enough(user.client))
var/available_in_days = job.available_in_days(user.client)
HTML += "<del>[rank]</del></td><td> \[IN [(available_in_days)] DAYS]</td></tr>"
@@ -13,7 +13,8 @@
volume,
nanoui_fancy,
show_ghostitem_attack,
lastchangelog
lastchangelog,
exp
FROM [format_table_name("player")]
WHERE ckey='[C.ckey]'"}
)
@@ -40,6 +41,7 @@
nanoui_fancy = text2num(query.item[11])
show_ghostitem_attack = text2num(query.item[12])
lastchangelog = query.item[13]
exp = query.item[14]
//Sanitize
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
@@ -54,6 +56,7 @@
nanoui_fancy = sanitize_integer(nanoui_fancy, 0, 1, initial(nanoui_fancy))
show_ghostitem_attack = sanitize_integer(show_ghostitem_attack, 0, 1, initial(show_ghostitem_attack))
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
exp = sanitize_text(exp, initial(exp))
return 1
/datum/preferences/proc/save_preferences(client/C)
@@ -285,6 +285,7 @@
if(player.mob && player.mob.mind)
player.mob.mind.transfer_to(src)
player.mob.mind.assigned_role = "Drone"
lawupdate = 0
to_chat(src, "<b>Systems rebooted</b>. Loading base pattern maintenance protocol... <b>loaded</b>.")
+3 -1
View File
@@ -244,8 +244,10 @@
if(!job.is_position_available()) return 0
if(jobban_isbanned(src,rank)) return 0
if(!is_job_whitelisted(src, rank)) return 0
if(!job.player_old_enough(src.client)) return 0
if(!job.player_old_enough(client)) return 0
if(job.admin_only && !(check_rights(R_EVENT, 0))) return 0
if(job.available_in_playtime(client))
return 0
if(config.assistantlimit)
if(job.title == "Civilian")