Merge pull request #7441 from FlattestGuitar/blur
Blurry eyes just got blurrier
This commit is contained in:
@@ -454,7 +454,9 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
|
||||
#define PDAIMG(what) {"<span class="pda16x16 [#what]"></span>"}
|
||||
|
||||
//Filters
|
||||
#define AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, border=4, color="#04080FAA")
|
||||
#define AMBIENT_OCCLUSION list("type"="drop_shadow","x"=0,"y"=-2,"size"=4,"border"=4,"color"="#04080FAA")
|
||||
#define EYE_BLUR list("type"="blur", "size"=3)
|
||||
#define GRAVITY_MOTION_BLUR list("type"="motion_blur","x"=0,"y"=0)
|
||||
|
||||
#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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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, AMBIENT_OCCLUSION)
|
||||
else
|
||||
remove_filter("ambient_occlusion")
|
||||
update_filters()
|
||||
|
||||
/obj/screen/plane_master/lighting
|
||||
name = "lighting plane master"
|
||||
|
||||
+7
-1
@@ -608,4 +608,10 @@
|
||||
|
||||
/atom/movable/proc/get_filter(name)
|
||||
if(filter_data && filter_data[name])
|
||||
return filters[filter_data.Find(name)]
|
||||
return filters[filter_data.Find(name)]
|
||||
|
||||
/atom/movable/proc/remove_filter(name)
|
||||
if(filter_data[name])
|
||||
filter_data -= name
|
||||
update_filters()
|
||||
return TRUE
|
||||
@@ -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
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
/mob/living/proc/gravity_animate()
|
||||
if(!get_filter("gravity"))
|
||||
add_filter("gravity",1,list("type"="motion_blur", "x"=0, "y"=0))
|
||||
add_filter("gravity",1, GRAVITY_MOTION_BLUR)
|
||||
INVOKE_ASYNC(src, .proc/gravity_pulse_animation)
|
||||
|
||||
/mob/living/proc/gravity_pulse_animation()
|
||||
|
||||
@@ -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, EYE_BLUR)
|
||||
F.add_filter("blurry_eyes", 2, EYE_BLUR)
|
||||
|
||||
/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 ////////////////////////////////////
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 118 KiB |
Reference in New Issue
Block a user