diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 3f1e31024be6..520751835b1e 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -136,6 +136,8 @@ ui_interact(usr) /atom/movable/screen/skill_menu/ui_interact(mob/user, datum/tgui/ui) + if(!user.mind) + CRASH("[user.type] ([user]) tried to use the skill menu without a mind!") ui = SStgui.try_update_ui(user, src, ui) if (!ui) ui = new(user, src, "SkillMenu", "Allocate Skill Points") @@ -148,6 +150,7 @@ skill_data.Add(list(list( "base" = user.get_skill(skill), "allocated" = allocated_skills[skill], + "exp_progress" = user.mind?.exp_progress[skill], ))) data["skills"] = skill_data data["skill_points"] = user.mind.skill_points @@ -155,6 +158,12 @@ data["exceptional_skill"] = HAS_MIND_TRAIT(user, TRAIT_EXCEPTIONAL_SKILL) return data +/atom/movable/screen/skill_menu/ui_static_data(mob/user) + var/static/list/data = list( + "exp_per_level" = EXPERIENCE_PER_LEVEL + ) + return data + /atom/movable/screen/skill_menu/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() if(.) diff --git a/tgui/packages/tgui/interfaces/SkillMenu.js b/tgui/packages/tgui/interfaces/SkillMenu.js index e7c03eafa935..0d624f4da4e4 100644 --- a/tgui/packages/tgui/interfaces/SkillMenu.js +++ b/tgui/packages/tgui/interfaces/SkillMenu.js @@ -1,6 +1,6 @@ import { classes } from 'common/react'; import { useBackend } from '../backend'; -import { Box, Button, Icon, LabeledList, Section, Stack, Tooltip } from '../components'; +import { Box, Button, Icon, LabeledList, ProgressBar, Section, Stack, Tooltip } from '../components'; import { Window } from '../layouts'; export const SkillMenu = (props, context) => { @@ -10,7 +10,7 @@ export const SkillMenu = (props, context) => { return ( @@ -21,30 +21,35 @@ export const SkillMenu = (props, context) => { name="Physiology" index={0} tooltip="Medical knowledge and surgical precision." + color='blue' />