NHSE/NHSE.Core/Structures/Map/Layers/ILayerFieldItemSet.cs
Kurt b88c518d5c
Update FieldItemEditor for 3.0.0 (#716)
Updates the Field Item Editor to render layers based on the entire map, and the per-patch positioning of each layer.
Import/export will gracefully handle upgrade/downgrade, and viewport import/export will gracefully update tiles rather than a per-acre basis.

Performance has also been slightly improved; no allocation is done anymore when updating the image.
2026-01-25 16:55:38 -06:00

27 lines
878 B
C#

using System.Collections.Generic;
namespace NHSE.Core;
public interface ILayerFieldItemSet
{
LayerFieldItem Layer0 { get; }
LayerFieldItem Layer1 { get; }
bool IsOccupied(int relX, int relY);
Item GetItem(int relX, int relY, bool baseLayer);
void SetItem(int relX, int relY, bool baseLayer, Item value);
Item this[int relX, int relY, bool baseLayer]
{
get => GetItem(relX, relY, baseLayer);
set => SetItem(relX, relY, baseLayer, value);
}
/// <summary>
/// Lists out all coordinates of tiles present in <see cref="Layer1"/> that don't have anything underneath in <see cref="Layer0"/> to support them.
/// </summary>
List<string> GetUnsupportedTiles(int totalWidth, int totalHeight);
List<string> GetUnsupportedTiles() => GetUnsupportedTiles(Layer0.TileInfo.TotalWidth, Layer0.TileInfo.TotalHeight);
}