mirror of
https://github.com/kwsch/NHSE.git
synced 2026-09-27 12:26:35 -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.
15 lines
468 B
C#
15 lines
468 B
C#
using System.Text;
|
|
|
|
namespace NHSE.Parsing;
|
|
|
|
public sealed record MSBTLabel
|
|
{
|
|
public required uint Length { get; init; }
|
|
public required uint Index { get; init; }
|
|
public required string Name { get; init; }
|
|
|
|
public MSBTTextString String { get; set; } = MSBTTextString.Empty;
|
|
|
|
public override string ToString() => Length > 0 ? Name : (Index + 1).ToString();
|
|
public string ToString(Encoding encoding) => encoding.GetString(String.Value.Span);
|
|
} |