Skip to content

Commit 7c4a717

Browse files
committed
Update ldtk json to 1.3.4
1 parent e9429e3 commit 7c4a717

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed

LDtk.Codegen/LDtkJsonFull.cs

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ namespace LDtk.Codegen;
44

55
using System;
66
using System.Collections.Generic;
7+
using System.Globalization;
8+
using System.Text.Json;
79
using System.Text.Json.Serialization;
810

911
using Microsoft.Xna.Framework;
@@ -57,6 +59,18 @@ public partial class LDtkFile
5759
[JsonPropertyName("customCommands")]
5860
public LdtkCustomCommand[] CustomCommands { get; set; }
5961

62+
/// <summary>
63+
/// Default height for new entities
64+
/// </summary>
65+
[JsonPropertyName("defaultEntityHeight")]
66+
public int DefaultEntityHeight { get; set; }
67+
68+
/// <summary>
69+
/// Default width for new entities
70+
/// </summary>
71+
[JsonPropertyName("defaultEntityWidth")]
72+
public int DefaultEntityWidth { get; set; }
73+
6074
/// <summary>
6175
/// Default grid size for new layers
6276
/// </summary>
@@ -596,6 +610,9 @@ public partial class FieldDefinition
596610
[JsonPropertyName("editorCutLongValues")]
597611
public bool EditorCutLongValues { get; set; }
598612

613+
[JsonPropertyName("editorDisplayColor")]
614+
public string EditorDisplayColor { get; set; }
615+
599616
/// <summary>
600617
/// Possible values: Hidden, ValueOnly, NameAndValue, EntityTile, LevelTile,
601618
/// Points, PointStar, PointPath, PointPathLoop, RadiusPx, RadiusGrid,
@@ -1252,7 +1269,7 @@ public partial class TilesetDefinition
12521269
/// source image changes.
12531270
/// </summary>
12541271
[JsonPropertyName("cachedPixelData")]
1255-
public Dictionary<string, object> CachedPixelData { get; init; }
1272+
public Dictionary<string, object> CachedPixelData { get; set; }
12561273

12571274
/// <summary>
12581275
/// An array of custom tile metadata
@@ -1553,6 +1570,18 @@ public partial class EntityInstance
15531570
/// </summary>
15541571
[JsonPropertyName("width")]
15551572
public int Width { get; set; }
1573+
1574+
/// <summary>
1575+
/// X world coordinate in pixels
1576+
/// </summary>
1577+
[JsonPropertyName("__worldX")]
1578+
public int _WorldX { get; set; }
1579+
1580+
/// <summary>
1581+
/// Y world coordinate in pixels
1582+
/// </summary>
1583+
[JsonPropertyName("__worldY")]
1584+
public int _WorldY { get; set; }
15561585
}
15571586

15581587
public partial class FieldInstance

LDtk/LDtkJson.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
#nullable disable
21
#pragma warning disable CS1591, IDE1006, CA1707, CA1716, IDE0130, CA1720, CA1711
32
// This file was auto generated, any changes will be lost. For LDtk 1.3.3
43
namespace LDtk;
54

65
using System;
6+
using System.Collections.Generic;
7+
using System.Globalization;
8+
using System.Text.Json;
79
using System.Text.Json.Serialization;
810

911
using Microsoft.Xna.Framework;
@@ -632,6 +634,18 @@ public partial class EntityInstance
632634
/// </summary>
633635
[JsonPropertyName("width")]
634636
public int Width { get; set; }
637+
638+
/// <summary>
639+
/// X world coordinate in pixels
640+
/// </summary>
641+
[JsonPropertyName("__worldX")]
642+
public int _WorldX { get; set; }
643+
644+
/// <summary>
645+
/// Y world coordinate in pixels
646+
/// </summary>
647+
[JsonPropertyName("__worldY")]
648+
public int _WorldY { get; set; }
635649
}
636650

637651
public partial class FieldInstance

Tools/LDtk.Quicktype/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static void GenerateFile(string file, string schema, string namespace_)
8585

8686
File.WriteAllLines(file, lines);
8787

88-
File.AppendAllText(file, "#pragma warning restore " + PragmaWarnings);
88+
File.AppendAllText(file, "#pragma warning restore " + PragmaWarnings + "\n");
8989
}
9090

9191
static void Format(string file)

0 commit comments

Comments
 (0)