mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Parallax in Darkness (#22136)
* you can now see parallax in darkness * moved parallax_darkness to toggles2 * uh oh * one more thing * total value * Update code/modules/client/preference/link_processing.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
@@ -62,8 +62,9 @@
|
||||
#define PREFTOGGLE_2_MC_TABS (1<<15) // 32768
|
||||
#define PREFTOGGLE_2_DANCE_DISCO (1<<16) // 65536
|
||||
#define PREFTOGGLE_2_MOD_ACTIVATION_METHOD (1<<17) // 131072
|
||||
#define PREFTOGGLE_2_PARALLAX_IN_DARKNESS (1<<18) // 262144
|
||||
|
||||
#define TOGGLES_2_TOTAL 262144 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
|
||||
#define TOGGLES_2_TOTAL 524287 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
|
||||
|
||||
#define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE|PREFTOGGLE_2_SEE_ITEM_OUTLINES|PREFTOGGLE_2_THOUGHT_BUBBLE|PREFTOGGLE_2_DANCE_DISCO|PREFTOGGLE_2_MOD_ACTIVATION_METHOD)
|
||||
|
||||
|
||||
@@ -17,10 +17,13 @@
|
||||
return
|
||||
// this is needed so it blends properly with the space plane and blackness plane.
|
||||
var/obj/screen/plane_master/space/S = plane_masters["[PLANE_SPACE]"]
|
||||
S.color = list(1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,)
|
||||
if(C.prefs.toggles2 & PREFTOGGLE_2_PARALLAX_IN_DARKNESS)
|
||||
S.color = rgb(0, 0, 0, 0)
|
||||
else
|
||||
S.color = list(1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,)
|
||||
S.appearance_flags |= NO_CLIENT_COLOR
|
||||
if(!length(C.parallax_layers_cached))
|
||||
C.parallax_layers_cached = list()
|
||||
@@ -33,6 +36,12 @@
|
||||
|
||||
C.parallax_layers = C.parallax_layers_cached.Copy()
|
||||
|
||||
var/obj/screen/plane_master/parallax/parallax_plane_master = plane_masters["[PLANE_SPACE_PARALLAX]"]
|
||||
if(C.prefs.toggles2 & PREFTOGGLE_2_PARALLAX_IN_DARKNESS)
|
||||
parallax_plane_master.blend_mode = BLEND_ADD
|
||||
else
|
||||
parallax_plane_master.blend_mode = BLEND_MULTIPLY
|
||||
|
||||
if(length(C.parallax_layers) > C.parallax_layers_max)
|
||||
C.parallax_layers.len = C.parallax_layers_max
|
||||
|
||||
|
||||
@@ -1086,6 +1086,10 @@
|
||||
if(parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref()
|
||||
|
||||
if("parallax_darkness")
|
||||
toggles2 ^= PREFTOGGLE_2_PARALLAX_IN_DARKNESS
|
||||
parent.mob?.hud_used?.update_parallax_pref()
|
||||
|
||||
if("screentip_mode")
|
||||
var/desired_screentip_mode = clamp(input(user, "Pick a screentip size, pick 0 to disable screentips. (We suggest a number between 8 and 15):", "Screentip Size") as null|num, 0, 20)
|
||||
if(!isnull(desired_screentip_mode))
|
||||
|
||||
@@ -428,6 +428,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
else
|
||||
dat += "High"
|
||||
dat += "</a><br>"
|
||||
dat += "<b>Parallax in darkness:</b> <a href='?_src_=prefs;preference=parallax_darkness'>[toggles2 & PREFTOGGLE_2_PARALLAX_IN_DARKNESS ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<b>Set screentip mode:</b> <a href='?_src_=prefs;preference=screentip_mode'>[(screentip_mode == 0) ? "Disabled" : "[screentip_mode]px"]</a><br>"
|
||||
dat += "<b>Screentip color:</b> <span style='border: 1px solid #161616; background-color: [screentip_color];'> </span> <a href='?_src_=prefs;preference=screentip_color'><b>Change</b></a><br>"
|
||||
dat += "<b>Play Admin MIDIs:</b> <a href='?_src_=prefs;preference=hear_midis'><b>[(sound & SOUND_MIDI) ? "Yes" : "No"]</b></a><br>"
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
"ckey" = C.ckey,
|
||||
"server_region" = server_region,
|
||||
"muted_adminsounds_ckeys" = json_encode(admin_sound_ckey_ignore),
|
||||
"viewrange" = viewrange,
|
||||
"viewrange" = viewrange
|
||||
))
|
||||
|
||||
if(!query.warn_execute())
|
||||
|
||||
@@ -173,6 +173,19 @@
|
||||
update_ambience_pref()
|
||||
SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Ambience") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/Toggle_Parallax_Dark() //All new ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
|
||||
set name = "Show/Hide Parallax in darkness"
|
||||
set category = "Preferences"
|
||||
set desc = "If enabled, drawing parallax if you see in dark instead of black tiles."
|
||||
prefs.toggles2 ^= PREFTOGGLE_2_PARALLAX_IN_DARKNESS
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.toggles2 & PREFTOGGLE_2_PARALLAX_IN_DARKNESS)
|
||||
to_chat(src, "You will now see parallax in dark with nightvisions.")
|
||||
else
|
||||
to_chat(src, "You will no longer see parallax in dark with nightvisions.")
|
||||
usr.hud_used?.update_parallax_pref()
|
||||
SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Parallax Darkness") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/Toggle_Buzz() //No more headaches because headphones bump up shipambience.ogg to insanity levels.
|
||||
set name = "Hear/Silence White Noise"
|
||||
set category = "Preferences"
|
||||
|
||||
Reference in New Issue
Block a user