mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
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:
@@ -49,7 +49,8 @@
|
||||
#define CHAT_NOICONS 0x8000
|
||||
|
||||
#define PARALLAX_SPACE 0x1
|
||||
#define PARALLAX_DUST 0x2
|
||||
#define PARALLAX_DUST 0x2
|
||||
#define PROGRESS_BARS 0x4
|
||||
|
||||
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC)
|
||||
|
||||
|
||||
@@ -654,14 +654,14 @@ proc/GaussRandRound(var/sigma,var/roundto)
|
||||
var/holding = user.get_active_hand()
|
||||
var/delayfraction = round(delay/numticks)
|
||||
var/image/progbar
|
||||
if(user && user.client && display_progress)
|
||||
if(user && user.client && (user.client.prefs.parallax_togs & PROGRESS_BARS) && display_progress)
|
||||
if(!progbar)
|
||||
progbar = image(icon = 'icons/effects/doafter_icon.dmi', loc = target, icon_state = "prog_bar_0")
|
||||
progbar.layer = 21
|
||||
progbar.pixel_z = WORLD_ICON_SIZE
|
||||
progbar.appearance_flags = RESET_TRANSFORM
|
||||
for (var/i = 1 to numticks)
|
||||
if(user && user.client && progbar && display_progress)
|
||||
if(user && user.client && (user.client.prefs.parallax_togs & PROGRESS_BARS) && progbar && display_progress)
|
||||
progbar.icon_state = "prog_bar_[round(((i / numticks) * 100), 10)]"
|
||||
user.client.images |= progbar
|
||||
sleep(delayfraction)
|
||||
@@ -706,14 +706,14 @@ proc/GaussRandRound(var/sigma,var/roundto)
|
||||
Location = user.loc
|
||||
var/holding = user.get_active_hand()
|
||||
var/image/progbar
|
||||
if(user && user.client && act_target && display_progress)
|
||||
if(user && user.client && (user.client.prefs.parallax_togs & PROGRESS_BARS) && act_target && display_progress)
|
||||
if(!progbar)
|
||||
progbar = image(icon = 'icons/effects/doafter_icon.dmi', loc = act_target, icon_state = "prog_bar_0")
|
||||
progbar.pixel_z = WORLD_ICON_SIZE
|
||||
progbar.layer = 21
|
||||
progbar.appearance_flags = RESET_COLOR | RESET_TRANSFORM
|
||||
for (var/i = 1 to numticks)
|
||||
if(user && user.client && act_target && display_progress)
|
||||
if(user && user.client && (user.client.prefs.parallax_togs & PROGRESS_BARS) && act_target && display_progress)
|
||||
if(!progbar)
|
||||
progbar = image(icon = 'icons/effects/doafter_icon.dmi', loc = act_target, icon_state = "prog_bar_0")
|
||||
progbar.pixel_z = WORLD_ICON_SIZE
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user