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
+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)