mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Hidden tiles (#5102)
* hidden tiles * Update TileSpawningUIController.cs * Update TileSpawningUIController.cs * Update ITileDefinition.cs * Update TileSpawningUIController.cs * Move EditorHidden where clause out * Make EditorHidden a DIM So there's no breaking change * Release notes. --------- Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
@@ -39,7 +39,7 @@ END TEMPLATE-->
|
||||
|
||||
### New features
|
||||
|
||||
*None yet*
|
||||
* `ITileDefinition.EditorHidden` allows hiding a tile from the tile spawn panel.
|
||||
|
||||
### Bugfixes
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ public sealed class TileSpawningUIController : UIController
|
||||
|
||||
_window.TileList.Clear();
|
||||
|
||||
IEnumerable<ITileDefinition> tileDefs = _tiles;
|
||||
IEnumerable<ITileDefinition> tileDefs = _tiles.Where(def => !def.EditorHidden);
|
||||
|
||||
if (!string.IsNullOrEmpty(searchStr))
|
||||
{
|
||||
|
||||
@@ -55,5 +55,10 @@ namespace Robust.Shared.Map
|
||||
/// </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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user