Files
CHOMPStation2/code/__defines/_planes+layers.dm
Leshana ebaf958179 Upgraded to "see-down" open spaces, inspired by Eris:
* Instead of open spaces simply showing a static image of the turf below, it shows the turf, all objects, and even moving mobs.
  * Controller updates the view to floor below fairly quickly; mobs update in real time.
  * Open space can be examined to see how deep it is.
  * Mobs are examinable even when on floor below, using a special "zshadow" mob.
  * Changes from Eris: Heavily re-written to handle layering, special cases, rewrote controller etc.  Shadow mobs don't break entering turfs, etc.
* Update to properly layer the objects from multiple "below" floors in the case of tripple-stacked or more z levels.
* Added constant defines for the planes in use.
* Added open_space.dmi with blank_open icon state for open space's darkening overlay.
2017-04-18 23:19:41 -04:00

55 lines
2.8 KiB
Plaintext

/*This file is a list of all preclaimed planes & layers
All planes & layers should be given a value here instead of using a magic/arbitrary number.
After fiddling with planes and layers for some time, I figured I may as well provide some documentation:
What are planes?
Think of Planes as a sort of layer for a layer - if plane X is a larger number than plane Y, the highest number for a layer in X will be below the lowest
number for a layer in Y.
Planes also have the added bonus of having planesmasters.
What are Planesmasters?
Planesmasters, when in the sight of a player, will have its appearance properties (for example, colour matrices, alpha, transform, etc)
applied to all the other objects in the plane. This is all client sided.
Usually you would want to add the planesmaster as an invisible image in the client's screen.
What can I do with Planesmasters?
You can: Make certain players not see an entire plane,
Make an entire plane have a certain colour matrices,
Make an entire plane transform in a certain way,
Make players see a plane which is hidden to normal players - I intend to implement this with the antag HUDs for example.
Planesmasters can be used as a neater way to deal with client images or potentially to do some neat things
How do planes work?
A plane can be any integer from -100 to 100. (If you want more, bug lummox.)
All planes above 0, the 'base plane', are visible even when your character cannot 'see' them, for example, the HUD.
All planes below 0, the 'base plane', are only visible when a character can see them.
How do I add a plane?
Think of where you want the plane to appear, look through the pre-existing planes and find where it is above and where it is below
Slot it in in that place, and change the pre-existing planes, making sure no plane shares a number.
Add a description with a comment as to what the plane does.
How do I make something a planesmaster?
Add the PLANE_MASTER appearance flag to the appearance_flags variable.
What is the naming convention for planes or layers?
Make sure to use the name of your object before the _LAYER or _PLANE, eg: [NAME_OF_YOUR_OBJECT HERE]_LAYER or [NAME_OF_YOUR_OBJECT HERE]_PLANE
Also, as it's a define, it is standard practice to use capital letters for the variable so people know this.
*/
#define DEFAULT_PLANE 0 // BYOND's default value for plane, the "base plane"
#define SPACE_PLANE -32 // Reserved for use in space/parallax
#define PARALLAX_PLANE -30 // Reserved for use in space/parallax
// OPENSPACE_PLANE reserves all planes between OPENSPACE_PLANE_START and OPENSPACE_PLANE_END inclusive
#define OPENSPACE_PLANE_START -23
#define OPENSPACE_PLANE_END -8
#define OPENSPACE_PLANE -25 // /turf/simulated/open will use OPENSPACE_PLANE + z (Valid z's being 2 thru 17)
#define OVER_OPENSPACE_PLANE -7