You can now look at your own skills mid-round.

And so can admins.
This commit is contained in:
cib
2012-03-01 13:47:27 -08:00
parent 652c34f23d
commit dfc6ed3abf
4 changed files with 88 additions and 8 deletions
+14
View File
@@ -1898,6 +1898,20 @@
dat += "</body></html>"
usr << browse(dat, "window=adminplayerinfo;size=480x480")
/obj/admins/proc/show_skills(var/mob/living/carbon/human/M as mob in world)
set category = "Admin"
set name = "Show Skills"
if (!istype(src,/obj/admins))
src = usr.client.holder
if (!istype(src,/obj/admins))
usr << "Error: you are not an admin!"
return
show_skill_window(usr, M)
return
/obj/admins/proc/Jobbans()
if ((src.rank in list( "Game Admin", "Game Master" )))
var/dat = "<B>Job Bans!</B><HR><table>"
+2
View File
@@ -267,6 +267,7 @@
verbs += /client/proc/unban_panel
verbs += /client/proc/jobbans
verbs += /client/proc/playernotes
verbs += /obj/admins/proc/show_skills
verbs += /obj/admins/proc/vmode
verbs += /obj/admins/proc/votekill
verbs += /client/proc/voting
@@ -394,6 +395,7 @@
verbs -= /client/proc/unban_panel
verbs -= /client/proc/jobbans
verbs -= /client/proc/playernotes
verbs -= /obj/admins/proc/show_skills
verbs -= /obj/admins/proc/vmode
verbs -= /obj/admins/proc/votekill
verbs -= /client/proc/voting
+1 -8
View File
@@ -153,14 +153,7 @@ datum/preferences
proc/SetSkills(mob/user)
if(SKILLS == null)
SKILLS = list()
for(var/T in (typesof(/datum/skill)-/datum/skill))
var/datum/skill/S = new T
if(S.ID != "none")
if(!SKILLS.Find(S.field))
SKILLS[S.field] = list()
var/list/L = SKILLS[S.field]
L += S
setup_skills()
if(skills.len == 0)
ZeroSkills()
+71
View File
@@ -156,3 +156,74 @@ datum/attribute/var
desc = "This is a placeholder"
proc/setup_skills()
if(SKILLS == null)
SKILLS = list()
for(var/T in (typesof(/datum/skill)-/datum/skill))
var/datum/skill/S = new T
if(S.ID != "none")
if(!SKILLS.Find(S.field))
SKILLS[S.field] = list()
var/list/L = SKILLS[S.field]
L += S
mob/living/carbon/human/proc/GetSkillClass(points)
// skill classes describe how your character compares in total points
switch(points)
if(0)
return "Unconfigured"
if(1 to 3)
return "Talentless"
if(4 to 6)
return "Below Average"
if(7 to 9)
return "Average"
if(10 to 12)
return "Talented"
if(13 to 15)
return "Extremely Talented"
if(16 to 18)
return "Genius"
if(19 to 21)
return "True Genius"
if(22 to 1000)
return "God"
proc/show_skill_window(var/mob/user, var/mob/living/carbon/human/M)
if(!istype(M)) return
if(SKILLS == null)
setup_skills()
if(!M.skills || M.skills.len == 0)
user << "There are no skills to display."
return
var/HTML = "<body>"
HTML += "<b>Select your Skills</b><br>"
HTML += "Current skill level: <b>[M.GetSkillClass(M.used_skillpoints)]</b> ([M.used_skillpoints])<br>"
HTML += "<a href=\"byond://?src=\ref[user];skills=1;preferences=1;preconfigured=1;\">Use preconfigured skillset</a><br>"
HTML += "<table>"
for(var/V in SKILLS)
HTML += "<tr><th colspan = 5><b>[V]</b></th></tr>"
for(var/datum/skill/S in SKILLS[V])
var/level = M.skills[S.ID]
HTML += "<tr style='text-align:left;'>"
HTML += "<th>[S.name]</th>"
HTML += "<th><font color=[(level == SKILL_NONE) ? "red" : "black"]>\[None\]</font></th>"
HTML += "<th><font color=[(level == SKILL_BASIC) ? "red" : "black"]>\[Basic\]</font></th>"
HTML += "<th><font color=[(level == SKILL_ADEPT) ? "red" : "black"]>\[Adept\]</font></th>"
HTML += "<th><font color=[(level == SKILL_EXPERT) ? "red" : "black"]>\[Expert\]</font></th>"
HTML += "</tr>"
HTML += "</table>"
user << browse(null, "window=show_skills")
user << browse(HTML, "window=show_skills;size=600x800")
return
mob/living/carbon/human/verb/show_skills()
set category = "IC"
set name = "Show Own Skills"
show_skill_window(src, src)