Skip to content

Commit 9308f68

Browse files
committed
Editor: fix DataFileWriter saving dummy inv properties with wrong ver
1 parent cbe57e0 commit 9308f68

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Editor/AGS.Editor/DataFileWriter.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,8 +1710,9 @@ public static bool SaveThisGameToFile(string fileName, Game game, CompileMessage
17101710
{
17111711
CustomPropertiesWriter.Write(writer, game.Characters[i].Properties);
17121712
}
1713-
writer.Write(1); // inv slot 0 is unused, write the property header (int 1)
1714-
writer.Write(0); // then write the number of props used by this inv item (int 0)
1713+
// inventory slot 0 is unused, write the dummy custom properties
1714+
CustomProperties dummyProperties = new CustomProperties();
1715+
CustomPropertiesWriter.Write(writer, dummyProperties);
17151716
for (int i = 0; i < game.InventoryItems.Count; ++i)
17161717
{
17171718
CustomPropertiesWriter.Write(writer, game.InventoryItems[i].Properties);

0 commit comments

Comments
 (0)