diff --git a/Themes/_fallback/Scripts/03 ProductivityHelpers.lua b/Themes/_fallback/Scripts/03 ProductivityHelpers.lua index efe523ddfa..eb2d64bb9d 100644 --- a/Themes/_fallback/Scripts/03 ProductivityHelpers.lua +++ b/Themes/_fallback/Scripts/03 ProductivityHelpers.lua @@ -223,6 +223,23 @@ end; --[[ ----------------------------------------------------------------------- ]] +--[[ profile stuff ]] +-- Profile(pn) +-- This returns a profile, preferably a player one. +-- If there isn't one, we fall back on the machine profile. +function Profile(pn) + if PROFILEMAN:IsPersistentProfile(pn) then + -- player profile + return PROFILEMAN:GetProfile(pn); + else + -- machine profile + return PROFILEMAN:GetMachineProfile(); + end; +end; +--[[ end profile stuff]] + +--[[ ----------------------------------------------------------------------- ]] + --[[ helper functions ]] function tobool(v) if type(v) == "string" then