Module:AchievementSystem: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Line 253: Line 253:


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Find the top-tier achievement for the user (lowest tier number)
-- Find the top-tier Title achievement for the user (lowest tier number)
-- Return the CSS class and the readable achievement name
-- Return the CSS class and the readable achievement name
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Line 295: Line 295:


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Renders a simple "box" with the top-tier achievement for the user
-- Renders a box with the top-tier achievement for the user
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function Achievements.renderAchievementBox(pageId)
function Achievements.renderAchievementBox(pageId)
Line 322: Line 322:
     end
     end


     -- Look for the highest-tier achievement (lowest tier number)
     -- Look for the highest-tier Title achievement (lowest tier number)
     local highestTier = 999
     local highestTier = 999
     local topAchType = nil
     local topAchType = nil
Line 384: Line 384:
-- Simple pass-through to track pages (for future expansions)
-- Simple pass-through to track pages (for future expansions)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function Achievements.trackPage(pageId, pageName)
function Achievements.trackPage(pageId, pageName) -- REVIEW
     -- In the future, this could update the page_name in the JSON data
     -- In the future, this could update the page_name in the JSON data
     return true
     return true