mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +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)
|
||||
|
||||
@@ -640,18 +640,18 @@
|
||||
/datum/reagent/rotatium/on_mob_life(mob/living/carbon/M)
|
||||
if(M.hud_used)
|
||||
if(current_cycle >= 20 && current_cycle % 20 == 0)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/atom/movable/plane_master_controller/pm_controller = M.hud_used.plane_master_controllers[PLANE_MASTERS_GAME]
|
||||
var/rotation = min(round(current_cycle / 20), 89) // By this point the player is probably puking and quitting anyway
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING, loop = -1)
|
||||
for(var/key in pm_controller.controlled_planes)
|
||||
animate(pm_controller.controlled_planes[key], transform = matrix(rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING, loop = -1)
|
||||
animate(transform = matrix(-rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/rotatium/on_mob_delete(mob/living/M)
|
||||
if(M && M.hud_used)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING)
|
||||
if(M?.hud_used)
|
||||
var/atom/movable/plane_master_controller/pm_controller = M.hud_used.plane_master_controllers[PLANE_MASTERS_GAME]
|
||||
for(var/key in pm_controller.controlled_planes)
|
||||
animate(pm_controller.controlled_planes[key], transform = matrix(), time = 5, easing = QUAD_EASING)
|
||||
..()
|
||||
|
||||
//////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user