Files
tbd-station-14/Content.Shared/DrawDepth/DrawDepth.cs
Flipp Syder f98057615f Adds explicit draw depth to certain entities (#5489)
* Adds explicit draw depth to certain entities

* a little documentation update
2021-11-26 12:28:13 +11:00

88 lines
3.1 KiB
C#

using Robust.Shared.Serialization;
using DrawDepthTag = Robust.Shared.GameObjects.DrawDepth;
namespace Content.Shared.DrawDepth
{
[ConstantsFor(typeof(DrawDepthTag))]
public enum DrawDepth
{
/// <summary>
/// This is for sub-floors, the floors you see after prying off a tile.
/// </summary>
LowFloors = DrawDepthTag.Default - 10,
// various entity types that require different
// draw depths, as to avoid hiding
#region SubfloorEntities
ThickPipe = DrawDepthTag.Default - 9,
ThickWire = DrawDepthTag.Default - 8,
ThinPipe = DrawDepthTag.Default - 7,
ThinWire = DrawDepthTag.Default - 6,
#endregion
/// <summary>
/// Things that are beneath regular floors.
/// </summary>
BelowFloor = DrawDepthTag.Default - 5,
/// <summary>
/// Used for entities like carpets.
/// </summary>
FloorTiles = DrawDepthTag.Default - 4,
/// <summary>
/// Things that are actually right on the floor, like puddles. This does not mean objects like
/// tables, even though they are technically "on the floor".
/// </summary>
FloorObjects = DrawDepthTag.Default - 3,
Walls = DrawDepthTag.Default - 2,
/// <summary>
/// Used for windows (grilles use walls) and misc signage. Useful if you want to have an APC in the middle
/// of some wall-art or something.
/// </summary>
WallTops = DrawDepthTag.Default - 1,
/// <summary>
/// Furniture, crates, tables. etc. If an entity should be drawn on top of a table, it needs a draw depth
/// that is higher than this.
/// </summary>
Objects = DrawDepthTag.Default,
/// <summary>
/// In-between an furniture and an item. Useful for entities that need to appear on top of tables, but are
/// not items. E.g., power cell chargers. Also useful for pizza boxes, which appear above crates, but not
/// above the pizza itself.
/// </summary>
SmallObjects = DrawDepthTag.Default + 1,
/// <summary>
/// Posters, APCs, air alarms, etc. This also includes most lights & lamps.
/// </summary>
WallMountedItems = DrawDepthTag.Default + 2,
/// <summary>
/// Generic items. Things that should be above crates & tables, but underneath mobs.
/// </summary>
Items = DrawDepthTag.Default + 3,
Mobs = DrawDepthTag.Default + 4,
Doors = DrawDepthTag.Default + 5,
/// <summary>
/// Explosions, fire, melee swings. Whatever.
/// </summary>
Effects = DrawDepthTag.Default + 6,
Ghosts = DrawDepthTag.Default + 7,
/// <summary>
/// Use this selectively if it absolutely needs to be drawn above (almost) everything else. Examples include
/// the pointing arrow, the drag & drop ghost-entity, and some debug tools.
/// </summary>
Overlays = DrawDepthTag.Default + 8,
}
}