Progress bar pref (#1938)

changes:

Players can now toggle progress bars on/off in Preferences.
This just adds another flag to the parallax toggles pref to keep things simple.
This commit is contained in:
Lohikar
2017-03-19 04:39:23 -05:00
committed by skull132
parent 301baf8559
commit 2a0353d8f9
5 changed files with 20 additions and 6 deletions

View File

@@ -63,6 +63,7 @@
. += "<b>Ghost radio:</b> <a href='?src=\ref[src];toggle=[CHAT_GHOSTRADIO]'><b>[(pref.toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]</b></a><br>"
. += "<b>Space Parallax:</b> <a href='?src=\ref[src];paratoggle=[PARALLAX_SPACE]'><b>[(pref.parallax_togs & PARALLAX_SPACE) ? "Yes" : "No"]</b></a><br>"
. += "<b>Space Dust:</b> <a href='?src=\ref[src];paratoggle=[PARALLAX_DUST]'><b>[(pref.parallax_togs & PARALLAX_DUST) ? "Yes" : "No"]</b></a><br>"
. += "<b>Progress Bars:</b> <a href='?src=\ref[src];paratoggle=[PROGRESS_BARS]'><b>[(pref.parallax_togs & PROGRESS_BARS) ? "Yes" : "No"]</b></a><br>"
/datum/category_item/player_setup_item/player_global/settings/OnTopic(var/href,var/list/href_list, var/mob/user)
if(href_list["toggle"])

View File

@@ -127,7 +127,7 @@ datum/preferences
// SPAAAACE
var/parallax_speed = 2
var/parallax_togs = PARALLAX_SPACE
var/parallax_togs = PARALLAX_SPACE | PROGRESS_BARS
var/list/pai = list() // A list for holding pAI related data.

View File

@@ -189,3 +189,15 @@
if (mob.hud_used)
mob.hud_used.update_parallax()
/client/verb/toggle_progress()
set name = "Show/Hide Progress Bars"
set category = "Preferences"
set desc = "Toggles progress bars on slow actions."
prefs.parallax_togs ^= PROGRESS_BARS
prefs.save_preferences()
if (prefs.parallax_togs & PROGRESS_BARS)
src << "You will now see progress bars on delayed actions."
else
src << "You will no longer see progress bars on delayed actions."