mirror of
https://github.com/kwsch/NHSE.git
synced 2026-03-26 03:24:38 -05:00
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.
27 lines
878 B
C#
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);
|
|
} |