mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +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:
@@ -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