diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 408b14f6d7..2456d7354f 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -453,9 +453,6 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE)) // Used by PDA and cartridge code to reduce repetitiveness of spritesheets #define PDAIMG(what) {""} -//Filters -#define AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, border=4, color="#04080FAA") - #define STANDARD_GRAVITY 1 //Anything above this is high gravity, anything below no grav #define GRAVITY_DAMAGE_TRESHOLD 3 //Starting with this value gravity will start to damage mobs diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index edc15bb984..4e0fd0b976 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -123,11 +123,6 @@ /obj/screen/fullscreen/impaired icon_state = "impairedoverlay" -/obj/screen/fullscreen/blurry - icon = 'icons/mob/screen_gen.dmi' - screen_loc = "WEST,SOUTH to EAST,NORTH" - icon_state = "blurry" - /obj/screen/fullscreen/flash icon = 'icons/mob/screen_gen.dmi' screen_loc = "WEST,SOUTH to EAST,NORTH" diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm index d4559ed66d..3c0b921820 100644 --- a/code/_onclick/hud/plane_master.dm +++ b/code/_onclick/hud/plane_master.dm @@ -29,9 +29,11 @@ blend_mode = BLEND_OVERLAY /obj/screen/plane_master/game_world/backdrop(mob/mymob) - filters = list() if(istype(mymob) && mymob.client && mymob.client.prefs && mymob.client.prefs.ambientocclusion) - filters += AMBIENT_OCCLUSION + add_filter("ambient_occlusion", 0, list("type" = "drop_shadow", "x" = 0, "y" = -2, "size" = 4, "border" = 4, "color" = "#04080FAA")) + else + remove_filter("ambient_occlusion") + update_filters() /obj/screen/plane_master/lighting name = "lighting plane master" diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 32e982e8e6..68089905b6 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -608,4 +608,10 @@ /atom/movable/proc/get_filter(name) if(filter_data && filter_data[name]) - return filters[filter_data.Find(name)] \ No newline at end of file + return filters[filter_data.Find(name)] + +/atom/movable/proc/remove_filter(name) + if(filter_data[name]) + filter_data -= name + update_filters() + return TRUE \ No newline at end of file diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 817e3c3f3b..e821d9e7da 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -133,7 +133,7 @@ else if(eye_blurry) //blurry eyes heal slowly eye_blurry = max(eye_blurry-1, 0) if(client && !eye_blurry) - clear_fullscreen("blurry") + remove_eyeblur() /mob/living/proc/update_damage_hud() return diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index 080307ee9d..1adc08ff91 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -205,25 +205,37 @@ var/old_eye_blurry = eye_blurry eye_blurry = max(amount, eye_blurry) if(!old_eye_blurry) - overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry) + add_eyeblur() /mob/proc/adjust_blurriness(amount) var/old_eye_blurry = eye_blurry eye_blurry = max(eye_blurry+amount, 0) if(amount>0) if(!old_eye_blurry) - overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry) + add_eyeblur() else if(old_eye_blurry && !eye_blurry) - clear_fullscreen("blurry") + remove_eyeblur() /mob/proc/set_blurriness(amount) var/old_eye_blurry = eye_blurry eye_blurry = max(amount, 0) if(amount>0) if(!old_eye_blurry) - overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry) + add_eyeblur() else if(old_eye_blurry) - clear_fullscreen("blurry") + remove_eyeblur() + +/mob/proc/add_eyeblur() + var/obj/screen/plane_master/game_world/GW = locate(/obj/screen/plane_master/game_world) in client.screen + var/obj/screen/plane_master/floor/F = locate(/obj/screen/plane_master/floor) in client.screen + GW.add_filter("blurry_eyes", 2, list("type"="blur", "size"=2)) + F.add_filter("blurry_eyes", 2, list("type"="blur", "size"=2)) + +/mob/proc/remove_eyeblur() + var/obj/screen/plane_master/game_world/GW = locate(/obj/screen/plane_master/game_world) in client.screen + var/obj/screen/plane_master/floor/F = locate(/obj/screen/plane_master/floor) in client.screen + GW.remove_filter("blurry_eyes") + F.remove_filter("blurry_eyes") /////////////////////////////////// DRUGGY //////////////////////////////////// diff --git a/icons/mob/screen_gen.dmi b/icons/mob/screen_gen.dmi index 28e37d526c..82b207abb1 100644 Binary files a/icons/mob/screen_gen.dmi and b/icons/mob/screen_gen.dmi differ