/tg/ Station 13 - Modules - TypesVar Details - Proc Details

plane_master

Vars

allows_offsettingIf our plane master allows for offsetting Mostly used for planes that really don't need to be duplicated, like the hud planes
alpha_enabledTracks if we're using our true alpha, or being manipulated in some other way
blend_mode_overrideblend mode to apply to the render relay in case you dont want to use the plane_masters blend_mode
criticalBitfield that describes how this plane master will render if its z layer is being "optimized" If a plane master is NOT critical, it will be completely dropped if we start to render outside a client's multiz boundary prefs Of note: most of the time we will relay renders to non critical planes in this stage. so the plane master will end up drawing roughly "in order" with its friends This is NOT done for parallax and other problem children, because the rules of BLEND_MULTIPLY appear to not behave as expected :( This will also just make debugging harder, because we do fragile things in order to ensure things operate as epected. I'm sorry Compile time See code__DEFINES\layers.dm for our bitflags
documentationWill be sent to the debug ui as a description for each plane Also useful as a place to explain to coders how/why your plane works, and what it's meant to do Plaintext and basic html are fine to use here. I'll bonk you if I find you putting "lmao stuff" in here, make this useful.
force_hiddenIf this plane master is being forced to hide. Hidden PMs will dump ANYTHING relayed or drawn onto them. Be careful with this Remember: a hidden plane master will dump anything drawn directly to it onto the output render. It does NOT hide its contents Use alpha for that
homeThe plane master group we're a member of, our "home"
is_outside_boundsIf this plane master is outside of our visual bounds right now
multiz_scaledIf this plane should be scaled by multiz Planes with this set should NEVER be relay'd into each other, as that will cause visual fuck
offsetOur offset from our "true" plane, see below
real_planeWhen rendering multiz, lower levels get their own set of plane masters Real plane here represents the "true" plane value of something, ignoring the offset required to handle lower levels
relayslist of current relays this plane is utilizing to render
relays_generatedif render relays have already be generated
render_relay_planeslist of planes we will relay this plane's render to
start_hiddenIf this plane master should be hidden from the player at roundstart We do this so PMs can opt into being temporary, to reduce load on clients
true_alphaOur real alpha value, so alpha can persist through being hidden/shown

Procs

add_relay_toCreates a connection between this plane master and the passed in plane Helper for out of system code, shouldn't be used in this file Build system to differenchiate between generated and non generated render relays
check_outside_boundsHook to allow planes to work around is_outside_bounds Return false to allow a show, true otherwise
generate_render_relaysPlane master proc called in Initialize() that creates relay objects, and sets them uo as needed Sets:
get_relay_toGets the relay atom we're using to connect to the target plane, if one exists
hide_fromHides a plane master from the passeed in mob Do your effect cleanup here
hide_planeForces this plane master to hide, until unhide_plane is called This allows us to disable unused PMs without breaking anything else
mirror_parent_hiddenMirrors our force hidden state to the hidden state of the plane that came before, assuming it's valid This allows us to mirror any hidden sets from before we were created, no matter how low that chance is
remove_relay_fromBreaks a connection between this plane master, and the passed in place
set_homeSets the plane group that owns us, it also determines what screen we render to Returns FALSE if the set_home fails, TRUE otherwise
show_toShows a plane master to the passed in mob Override this to apply unique effects and such Returns TRUE if the call is allowed, FALSE otherwise
unhide_planeDisables any forced hiding, allows the plane master to be used as normal
update_offsetUpdates our "offset", basically what layer of multiz we're meant to render Top is 0, goes up as you go down It's taken into account by render targets and relays, so we gotta make sure they're on the same page

Var Details

allows_offsetting

If our plane master allows for offsetting Mostly used for planes that really don't need to be duplicated, like the hud planes

alpha_enabled

Tracks if we're using our true alpha, or being manipulated in some other way

blend_mode_override

blend mode to apply to the render relay in case you dont want to use the plane_masters blend_mode

critical

Bitfield that describes how this plane master will render if its z layer is being "optimized" If a plane master is NOT critical, it will be completely dropped if we start to render outside a client's multiz boundary prefs Of note: most of the time we will relay renders to non critical planes in this stage. so the plane master will end up drawing roughly "in order" with its friends This is NOT done for parallax and other problem children, because the rules of BLEND_MULTIPLY appear to not behave as expected :( This will also just make debugging harder, because we do fragile things in order to ensure things operate as epected. I'm sorry Compile time See code__DEFINES\layers.dm for our bitflags

documentation

Will be sent to the debug ui as a description for each plane Also useful as a place to explain to coders how/why your plane works, and what it's meant to do Plaintext and basic html are fine to use here. I'll bonk you if I find you putting "lmao stuff" in here, make this useful.

force_hidden

If this plane master is being forced to hide. Hidden PMs will dump ANYTHING relayed or drawn onto them. Be careful with this Remember: a hidden plane master will dump anything drawn directly to it onto the output render. It does NOT hide its contents Use alpha for that

home

The plane master group we're a member of, our "home"

is_outside_bounds

If this plane master is outside of our visual bounds right now

multiz_scaled

If this plane should be scaled by multiz Planes with this set should NEVER be relay'd into each other, as that will cause visual fuck

offset

Our offset from our "true" plane, see below

real_plane

When rendering multiz, lower levels get their own set of plane masters Real plane here represents the "true" plane value of something, ignoring the offset required to handle lower levels

relays

list of current relays this plane is utilizing to render

relays_generated

if render relays have already be generated

render_relay_planes

list of planes we will relay this plane's render to

start_hidden

If this plane master should be hidden from the player at roundstart We do this so PMs can opt into being temporary, to reduce load on clients

true_alpha

Our real alpha value, so alpha can persist through being hidden/shown

Proc Details

add_relay_to

Creates a connection between this plane master and the passed in plane Helper for out of system code, shouldn't be used in this file Build system to differenchiate between generated and non generated render relays

check_outside_bounds

Hook to allow planes to work around is_outside_bounds Return false to allow a show, true otherwise

generate_render_relays

Plane master proc called in Initialize() that creates relay objects, and sets them uo as needed Sets:

get_relay_to

Gets the relay atom we're using to connect to the target plane, if one exists

hide_from

Hides a plane master from the passeed in mob Do your effect cleanup here

hide_plane

Forces this plane master to hide, until unhide_plane is called This allows us to disable unused PMs without breaking anything else

mirror_parent_hidden

Mirrors our force hidden state to the hidden state of the plane that came before, assuming it's valid This allows us to mirror any hidden sets from before we were created, no matter how low that chance is

remove_relay_from

Breaks a connection between this plane master, and the passed in place

set_home

Sets the plane group that owns us, it also determines what screen we render to Returns FALSE if the set_home fails, TRUE otherwise

show_to

Shows a plane master to the passed in mob Override this to apply unique effects and such Returns TRUE if the call is allowed, FALSE otherwise

unhide_plane

Disables any forced hiding, allows the plane master to be used as normal

update_offset

Updates our "offset", basically what layer of multiz we're meant to render Top is 0, goes up as you go down It's taken into account by render targets and relays, so we gotta make sure they're on the same page