Files
RobustToolbox/Robust.Shared/Map/ITileDefinition.cs
slarticodefast 4747e5a05a Add and update a lot of documentation (#6337)
* Serialization docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* ECS docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* scattered docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* Fixes

---------

Co-authored-by: Moony <moonheart08@users.noreply.github.com>
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-12-15 20:26:17 +01:00

69 lines
2.2 KiB
C#

using System.Collections.Generic;
using Robust.Shared.Maths;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Robust.Shared.Map
{
/// <summary>
/// The definition (template) for a grid tile.
/// </summary>
public interface ITileDefinition : IPrototype
{
/// <summary>
/// The numeric tile ID used to refer to this tile inside the map datastructure.
/// </summary>
/// <remarks>
/// The engine does not automatically generate these IDs, games are responsible for assigning them.
/// </remarks>
ushort TileId { get; }
/// <summary>
/// The name of the definition. This is user facing.
/// </summary>
string Name { get; }
/// <summary>
/// The path of the sprite to draw.
/// </summary>
ResPath? Sprite { get; }
/// <summary>
/// Possible sprites to use if we're neighboring another tile.
/// </summary>
Dictionary<Direction, ResPath> EdgeSprites { get; }
/// <summary>
/// When drawing adjacent tiles that both specify edge sprites, the one with the higher priority
/// is always solely drawn.
/// </summary>
int EdgeSpritePriority { get; }
/// <summary>
/// Physics objects that are interacting on this tile are slowed down by this float.
/// </summary>
float Friction { get; }
/// <summary>
/// Number of variants this tile has. ALSO DETERMINES THE EXPECTED INPUT TEXTURE SIZE.
/// </summary>
byte Variants { get; }
/// <summary>
/// Allows the tile to be rotated/mirrored when placed on a grid.
/// </summary>
bool AllowRotationMirror => false;
/// <summary>
/// Assign a new value to <see cref="TileId"/>, used when registering the tile definition.
/// </summary>
/// <param name="id">The new tile ID for this tile definition.</param>
void AssignTileId(ushort id);
/// <summary>
/// Allows you to hide tiles from the tile spawn menu.
/// </summary>
bool EditorHidden => false;
}
}