mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-03 21:24:47 +01:00
f4ff22e017
* Achievements now show how many people have unlocked them. (#77083) ## About The Pull Request Checking the achievements UI now shows a line below the Unlocked/Locked status for normal achievements, informing the user of how many players have unlocked said achievement. It also contains a tooltip; within it is a percentile comparison with the most unlocked achievement. Beside that, I've added a check in the achievement unit test to ascertain that all award categories are actually present in the UI, and as well moved all `ui_data` to `static_ui_date` considering it is not the sort of interface that has to be constantly updated like an air alarm or an APC. Here's a screenshot of the UI, with the tooltip where my cursor would be (the hot damn! achievement was var-edited of course):  ## Why It's Good For The Game This should provide some fundamental statistics for achievements, from which contributors and players can deduct the rarity and bragging rights. ## Changelog 🆑 qol: The Achievements UI now shows how many people have unlocked a given achievement. fix: The "Skills" Category for achievements should no longer be hidden. /🆑 --------- Co-authored-by: san7890 <the@ san7890.com> Co-authored-by: Jordie0608 <4343468+Jordie0608@ users.noreply.github.com> * Achievements now show how many people have unlocked them. --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: san7890 <the@ san7890.com> Co-authored-by: Jordie0608 <4343468+Jordie0608@ users.noreply.github.com>
17 lines
898 B
Plaintext
17 lines
898 B
Plaintext
///Checks that all achievements have an existing icon state in the achievements icon file.
|
|
/datum/unit_test/achievements
|
|
|
|
/datum/unit_test/achievements/Run()
|
|
var/award_icons = icon_states(ACHIEVEMENTS_SET)
|
|
for(var/datum/award/award as anything in subtypesof(/datum/award))
|
|
if(!initial(award.name)) //Skip abstract achievements types
|
|
continue
|
|
var/init_icon = initial(award.icon)
|
|
if(!init_icon || !(init_icon in award_icons))
|
|
TEST_FAIL("Award [initial(award.name)] has an unexistent icon: \"[init_icon || "null"]\"")
|
|
if(length(initial(award.database_id)) > 32) //sql schema limit
|
|
TEST_FAIL("Award [initial(award.name)] database id is too long")
|
|
var/init_category = initial(award.category)
|
|
if(!(init_category in GLOB.achievement_categories))
|
|
TEST_FAIL("Award [initial(award.name)] has unsupported category: \"[init_category || "null"]\". Update GLOB.achievement_categories")
|