mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 23:48:28 +01:00
Merge pull request #16303 from FlattestGuitar/blur-me-up-scotty
Stab your eyes out with style
This commit is contained in:
@@ -211,11 +211,12 @@
|
||||
|
||||
/mob/living/SetEyeBlurry(amount, updating = TRUE)
|
||||
. = STATUS_UPDATE_BLURRY
|
||||
if((!!amount) == (!!eye_blurry)) // We're not changing from + to 0 or vice versa
|
||||
//if they're both above max or equal that means we won't change the blur filter
|
||||
if(amount > MAX_EYE_BLURRY_FILTER_SIZE / EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER && eye_blurry > MAX_EYE_BLURRY_FILTER_SIZE / EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER || eye_blurry == amount)
|
||||
updating = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
|
||||
eye_blurry = max(amount, 0)
|
||||
// We transitioned to/from 0, so update the eye blur overlays
|
||||
if(updating)
|
||||
update_blurry_effects()
|
||||
|
||||
|
||||
@@ -9,12 +9,11 @@
|
||||
return 0
|
||||
|
||||
/mob/living/update_blurry_effects()
|
||||
if(eyes_blurred())
|
||||
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
return 1
|
||||
var/atom/movable/plane_master_controller/game_plane_master_controller = hud_used.plane_master_controllers[PLANE_MASTERS_GAME]
|
||||
if(eye_blurry)
|
||||
game_plane_master_controller.add_filter("eye_blur", 1, gauss_blur_filter(clamp(eye_blurry * EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER, 0.6, MAX_EYE_BLURRY_FILTER_SIZE)))
|
||||
else
|
||||
clear_fullscreen("blurry")
|
||||
return 0
|
||||
game_plane_master_controller.remove_filter("eye_blur")
|
||||
|
||||
/mob/living/update_druggy_effects()
|
||||
if(druggy)
|
||||
|
||||
Reference in New Issue
Block a user