Files
Paradise/code/_onclick/hud/plane_master.dm
2019-05-10 20:34:11 +02:00

54 lines
1.9 KiB
Plaintext

/obj/screen/plane_master
screen_loc = "CENTER"
icon_state = "blank"
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
blend_mode = BLEND_OVERLAY
var/show_alpha = 255
var/hide_alpha = 0
/obj/screen/plane_master/proc/Show(override)
alpha = override || show_alpha
/obj/screen/plane_master/proc/Hide(override)
alpha = override || hide_alpha
/obj/screen/plane_master/proc/outline(_size, _color)
filters += filter(type = "outline", size = _size, color = _color)
/obj/screen/plane_master/proc/shadow(_size, _border, _offset = 0, _x = 0, _y = 0, _color = "#04080FAA")
filters += filter(type = "drop_shadow", x = _x, y = _y, color = _color, size = _size, offset = _offset, border = _border)
/obj/screen/plane_master/proc/clear_filters()
filters = list()
//Why do plane masters need a backdrop sometimes? Read http://www.byond.com/forum/?post=2141928
//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
/obj/screen/plane_master/proc/backdrop(mob/mymob)
/obj/screen/plane_master/floor
name = "floor plane master"
plane = FLOOR_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/game_world
name = "game world plane master"
plane = GAME_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/game_world/backdrop(mob/mymob)
clear_filters()
if(istype(mymob) && mymob.client && mymob.client.prefs && (mymob.client.prefs.toggles & AMBIENT_OCCLUSION))
filters += FILTER_AMBIENT_OCCLUSION
/obj/screen/plane_master/lighting
name = "lighting plane master"
plane = LIGHTING_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/lighting/backdrop(mob/mymob)
mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit)
mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit)