mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-11 07:58:57 +01:00
adeaaaee4a
Balloon Alerts were sharing planes with NVG effects, causing them to blend improperly. I re-added their proper plane, and ensured they work again.
248 lines
8.8 KiB
Plaintext
248 lines
8.8 KiB
Plaintext
/atom/movable/screen/plane_master
|
|
screen_loc = "CENTER"
|
|
icon_state = "blank"
|
|
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
|
|
blend_mode = BLEND_OVERLAY
|
|
plane = LOWEST_EVER_PLANE
|
|
var/show_alpha = 255
|
|
var/hide_alpha = 0
|
|
|
|
//--rendering relay vars--
|
|
///integer: what plane we will relay this planes render to
|
|
var/render_relay_plane = RENDER_PLANE_GAME
|
|
///bool: Whether this plane should get a render target automatically generated
|
|
var/generate_render_target = TRUE
|
|
///integer: blend mode to apply to the render relay in case you dont want to use the plane_masters blend_mode
|
|
var/blend_mode_override
|
|
///reference: current relay this plane is utilizing to render
|
|
var/obj/render_plane_relay/relay
|
|
|
|
/atom/movable/screen/plane_master/proc/Show(override)
|
|
alpha = override || show_alpha
|
|
|
|
/atom/movable/screen/plane_master/proc/Hide(override)
|
|
alpha = override || hide_alpha
|
|
|
|
//Why do plane masters need a backdrop sometimes? Read https://secure.byond.com/forum/?post=2141928
|
|
//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
|
|
/atom/movable/screen/plane_master/proc/backdrop(mob/mymob)
|
|
SHOULD_CALL_PARENT(TRUE)
|
|
if(!isnull(render_relay_plane))
|
|
relay_render_to_plane(mymob, render_relay_plane)
|
|
|
|
///Contains most things in the game world
|
|
/atom/movable/screen/plane_master/game_world
|
|
name = "game world plane master"
|
|
plane = GAME_PLANE
|
|
appearance_flags = PLANE_MASTER
|
|
blend_mode = BLEND_OVERLAY
|
|
|
|
/atom/movable/screen/plane_master/game_world/backdrop(mob/mymob)
|
|
. = ..()
|
|
remove_filter("AO")
|
|
add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA"))
|
|
|
|
/atom/movable/screen/plane_master/game_world_above
|
|
name = "above game world plane master"
|
|
plane = ABOVE_GAME_PLANE
|
|
|
|
/atom/movable/screen/plane_master/ghost
|
|
name = "ghost plane master"
|
|
plane = GHOST_PLANE
|
|
render_relay_plane = RENDER_PLANE_NON_GAME
|
|
|
|
/// Plane master handling display of building roofs. They're meant to become invisible when inside a building.
|
|
/atom/movable/screen/plane_master/roof
|
|
name = "roof plane master"
|
|
plane = ROOF_PLANE
|
|
appearance_flags = PLANE_MASTER
|
|
blend_mode = BLEND_OVERLAY
|
|
|
|
/atom/movable/screen/plane_master/space
|
|
name = "space plane master"
|
|
plane = SPACE_PLANE
|
|
blend_mode = BLEND_OVERLAY
|
|
|
|
/// Plane master handling skyboxes.
|
|
/atom/movable/screen/plane_master/skybox
|
|
name = "skybox plane master"
|
|
plane = SKYBOX_PLANE
|
|
blend_mode = BLEND_MULTIPLY
|
|
appearance_flags = PLANE_MASTER
|
|
|
|
/**
|
|
* Plane master handling byond internal blackness
|
|
* vars are set as to replicate behavior when rendering to other planes
|
|
* do not touch this unless you know what you are doing
|
|
*/
|
|
/atom/movable/screen/plane_master/blackness
|
|
name = "darkness plane master"
|
|
plane = BLACKNESS_PLANE
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
blend_mode = BLEND_MULTIPLY
|
|
appearance_flags = PLANE_MASTER | NO_CLIENT_COLOR | PIXEL_SCALE
|
|
//byond internal end
|
|
|
|
/*!
|
|
* This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers.
|
|
*
|
|
* Emissive overlays are pasted with an atom color that converts them to be entirely some specific color.
|
|
* Emissive blockers are pasted with an atom color that converts them to be entirely some different color.
|
|
* Emissive overlays and emissive blockers are put onto the same plane.
|
|
* The layers for the emissive overlays and emissive blockers cause them to mask eachother similar to normal BYOND objects.
|
|
* A color matrix filter is applied to the emissive plane to mask out anything that isn't whatever the emissive color is.
|
|
* This is then used to alpha mask the lighting plane.
|
|
*/
|
|
|
|
///Contains all lighting objects
|
|
/atom/movable/screen/plane_master/lighting
|
|
name = "lighting plane master"
|
|
plane = LIGHTING_PLANE
|
|
blend_mode_override = BLEND_MULTIPLY
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
|
|
/atom/movable/screen/plane_master/lighting/backdrop(mob/mymob)
|
|
. = ..()
|
|
mymob.overlay_fullscreen("lighting_backdrop", /atom/movable/screen/fullscreen/lighting_backdrop/backplane)
|
|
mymob.overlay_fullscreen("lighting_backdrop_lit_secondary", /atom/movable/screen/fullscreen/lighting_backdrop/lit_secondary)
|
|
|
|
/atom/movable/screen/plane_master/lighting/Initialize()
|
|
. = ..()
|
|
add_filter("emissives", 1, alpha_mask_filter(render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE))
|
|
add_filter("object_lighting", 2, alpha_mask_filter(render_source = O_LIGHTING_VISUAL_RENDER_TARGET, flags = MASK_INVERSE))
|
|
/**
|
|
* Handles emissive overlays and emissive blockers.
|
|
*/
|
|
/atom/movable/screen/plane_master/emissive
|
|
name = "emissive plane master"
|
|
plane = EMISSIVE_PLANE
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
render_target = EMISSIVE_RENDER_TARGET
|
|
render_relay_plane = null
|
|
|
|
/atom/movable/screen/plane_master/emissive/Initialize()
|
|
. = ..()
|
|
add_filter("em_block_masking", 1, color_matrix_filter(GLOB.em_mask_matrix))
|
|
|
|
/atom/movable/screen/plane_master/above_lighting
|
|
name = "above lighting plane master"
|
|
plane = ABOVE_LIGHTING_PLANE
|
|
appearance_flags = PLANE_MASTER //should use client color
|
|
blend_mode = BLEND_OVERLAY
|
|
render_relay_plane = RENDER_PLANE_GAME
|
|
|
|
/atom/movable/screen/plane_master/runechat
|
|
name = "runechat plane master"
|
|
plane = RUNECHAT_PLANE
|
|
appearance_flags = PLANE_MASTER
|
|
render_relay_plane = RENDER_PLANE_NON_GAME
|
|
|
|
/atom/movable/screen/plane_master/runechat/backdrop(mob/mymob)
|
|
. = ..()
|
|
remove_filter("AO")
|
|
add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA"))
|
|
|
|
//Holds balloon chat images, those little text bars that pop up for a second when you do some things. NOT runechat.
|
|
/atom/movable/screen/plane_master/balloon_chat
|
|
name = "balloon chat plane master"
|
|
plane = BALLOON_CHAT_PLANE
|
|
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
|
|
render_relay_plane = RENDER_PLANE_NON_GAME
|
|
|
|
/atom/movable/screen/plane_master/o_light_visual
|
|
name = "overlight light visual plane master"
|
|
plane = O_LIGHTING_VISUAL_PLANE
|
|
render_target = O_LIGHTING_VISUAL_RENDER_TARGET
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
blend_mode = BLEND_MULTIPLY
|
|
blend_mode_override = BLEND_MULTIPLY
|
|
|
|
/atom/movable/screen/plane_master/nvg_plane
|
|
name = "NVG plane"
|
|
plane = NVG_PLANE
|
|
render_relay_plane = RENDER_PLANE_GAME
|
|
blend_mode_override = BLEND_MULTIPLY
|
|
|
|
/atom/movable/screen/plane_master/fullscreen
|
|
name = "fullscreen alert plane"
|
|
plane = FULLSCREEN_PLANE
|
|
render_relay_plane = RENDER_PLANE_NON_GAME
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
|
|
/atom/movable/screen/plane_master/hud
|
|
name = "HUD plane"
|
|
plane = HUD_PLANE
|
|
render_relay_plane = RENDER_PLANE_NON_GAME
|
|
|
|
/atom/movable/screen/plane_master/cinematic
|
|
name = "cinematic plane"
|
|
plane = CINEMATIC_PLANE
|
|
render_relay_plane = RENDER_PLANE_NON_GAME
|
|
|
|
/atom/movable/screen/plane_master/displacement
|
|
name = "displacement plane"
|
|
blend_mode = BLEND_ADD
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
plane = DISPLACEMENT_PLATE_RENDER_LAYER
|
|
render_target = DISPLACEMENT_PLATE_RENDER_TARGET
|
|
render_relay_plane = null
|
|
|
|
/atom/movable/screen/plane_master/warp
|
|
name = "warp plane"
|
|
blend_mode = BLEND_ADD
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
plane = WARP_EFFECT_PLANE
|
|
render_target = WARP_EFFECT_PLATE_RENDER_TARGET
|
|
render_relay_plane = null
|
|
|
|
/atom/movable/screen/plane_master/heat
|
|
name = "heat haze plane"
|
|
blend_mode = BLEND_ADD
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
plane = HEAT_EFFECT_PLANE
|
|
render_target = HEAT_EFFECT_COMPOSITE_RENDER_TARGET
|
|
render_relay_plane = null
|
|
|
|
var/gas_heat_object
|
|
//Not actually handled in this plane, we just use this to spawn the particle emitter so byond's rendering system will source it.
|
|
var/gas_cold_object
|
|
|
|
/atom/movable/screen/plane_master/heat/Initialize()
|
|
. = ..()
|
|
setup()
|
|
|
|
/atom/movable/screen/plane_master/heat/proc/setup()
|
|
//TODO: Add graphical options. If players don't like heat haze, replace particles with icons
|
|
if (gas_heat_object)
|
|
remove_vis_contents(gas_heat_object)
|
|
if (gas_cold_object)
|
|
remove_vis_contents(gas_cold_object)
|
|
gas_heat_object = new /obj/particle_emitter/heat/high
|
|
gas_cold_object = new /obj/particle_emitter/mist/gas
|
|
add_vis_contents(gas_heat_object)
|
|
add_vis_contents(gas_cold_object)
|
|
|
|
/atom/movable/screen/plane_master/open_space
|
|
name = "open space plane"
|
|
plane = OPEN_SPACE_PLANE_END //aurora snowflake: our openspace system works bottom up, not top down like CM's
|
|
|
|
/atom/movable/screen/plane_master/open_space/Initialize(mapload, offset)
|
|
name = "open space plane [offset]"
|
|
plane -= offset
|
|
. = ..()
|
|
add_filter("multizblur", 1, gauss_blur_filter(0.5 + 0.25 * (offset + 1)))
|
|
|
|
/atom/movable/screen/plane_master/openspace_backdrop
|
|
name = "open space plane master"
|
|
plane = OPENSPACE_BACKDROP_PLANE
|
|
appearance_flags = PLANE_MASTER
|
|
blend_mode = BLEND_MULTIPLY
|
|
alpha = 255
|
|
|
|
/atom/movable/screen/plane_master/openspace_backdrop/Initialize()
|
|
. = ..()
|
|
filters = list()
|
|
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -10)
|
|
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15)
|
|
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20)
|