mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
adds dark flash toggle (#30945)
* add dark flash toggle * check for client * remove string shenanigans, makes the dark flash path a var * rename type argument to something that doesn't belong in an asylum
This commit is contained in:
@@ -1065,6 +1065,9 @@
|
||||
var/atom/movable/screen/plane_master/cogbar/PM = locate(/atom/movable/screen/plane_master/cogbar) in parent.screen
|
||||
PM.backdrop(parent.mob)
|
||||
|
||||
if("dark_flash")
|
||||
toggles3 ^= PREFTOGGLE_3_DARK_FLASH
|
||||
|
||||
if("be_special")
|
||||
var/r = href_list["role"]
|
||||
if(r in GLOB.special_roles)
|
||||
|
||||
@@ -487,6 +487,7 @@ GLOBAL_LIST_INIT(special_role_times, list(
|
||||
dat += "<b> - TGUI Input - Large Buttons:</b> <a href='byond://?_src_=prefs;preference=tgui_input_large'>[(toggles2 & PREFTOGGLE_2_LARGE_INPUT_BUTTONS) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b> - TGUI Input - Swap Buttons:</b> <a href='byond://?_src_=prefs;preference=tgui_input_swap'>[(toggles2 & PREFTOGGLE_2_SWAP_INPUT_BUTTONS) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b> - TGUI Say Theme:</b> <a href='byond://?_src_=prefs;preference=tgui_say_light_mode'>[(toggles2 & PREFTOGGLE_2_ENABLE_TGUI_SAY_LIGHT_MODE) ? "Light" : "Dark"]</a><br>"
|
||||
dat += "<b>Dark flash:</b> <a href='byond://?_src_=prefs;preference=dark_flash'>[(toggles3 & PREFTOGGLE_3_DARK_FLASH) ? "Yes" : "No"]</a><br>"
|
||||
dat += "</td></tr></table>"
|
||||
|
||||
if(TAB_ANTAG) // Antagonist's Preferences (and maps)
|
||||
|
||||
@@ -402,7 +402,7 @@
|
||||
if((E?.status & ORGAN_DEAD) || E?.is_broken() || !.)
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /atom/movable/screen/fullscreen/stretch/flash)
|
||||
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, flash_type = /atom/movable/screen/fullscreen/stretch/flash)
|
||||
//Parent proc checks if a mob can_be_flashed()
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -856,10 +856,13 @@
|
||||
return TRUE
|
||||
|
||||
//called when the mob receives a bright flash
|
||||
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /atom/movable/screen/fullscreen/stretch/flash)
|
||||
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, flash_type = /atom/movable/screen/fullscreen/stretch/flash)
|
||||
SIGNAL_HANDLER
|
||||
if(can_be_flashed(intensity, override_blindness_check))
|
||||
overlay_fullscreen("flash", type)
|
||||
var/atom/movable/screen/fullscreen/stretch/flash/flash = flash_type
|
||||
if(client && client.prefs.toggles3 & PREFTOGGLE_3_DARK_FLASH)
|
||||
flash_type = flash.dark_type
|
||||
overlay_fullscreen("flash", flash_type)
|
||||
addtimer(CALLBACK(src, PROC_REF(clear_fullscreen), "flash", 25), 25)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
..()
|
||||
update_headlamp(TRUE, 0, FALSE)
|
||||
|
||||
/mob/living/silicon/robot/drone/flash_eyes(intensity = 1, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, laser_pointer = FALSE, type = /atom/movable/screen/fullscreen/stretch/flash/noise)
|
||||
/mob/living/silicon/robot/drone/flash_eyes(intensity = 1, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, laser_pointer = FALSE, flash_type = /atom/movable/screen/fullscreen/stretch/flash/noise)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
sleep(3)
|
||||
step_away(src, user, 15)
|
||||
|
||||
/mob/living/silicon/robot/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /atom/movable/screen/fullscreen/stretch/flash/noise)
|
||||
/mob/living/silicon/robot/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, flash_type = /atom/movable/screen/fullscreen/stretch/flash/noise)
|
||||
if(!affect_silicon || !can_be_flashed())
|
||||
return
|
||||
Confused(intensity * 4 SECONDS)
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
/mob/living/silicon/get_access()
|
||||
return IGNORE_ACCESS //silicons always have access
|
||||
|
||||
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /atom/movable/screen/fullscreen/stretch/flash/noise)
|
||||
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, flash_type = /atom/movable/screen/fullscreen/stretch/flash/noise)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user