Skip to content

Commit b9f3a9d

Browse files
fixed outputdat as commented
1 parent f78b4ec commit b9f3a9d

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

GameEngine/GameData - Output.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -385,16 +385,16 @@ public static void SaveAsCommentedDat(string pFile)
385385
var header = new GameHeader(DATToChunks.GetTokensAsInt(12));
386386

387387
sw.WriteLine("{0} /*Unknown*/", header.Unknown);
388-
sw.WriteLine("{0} /*Number of items*/", header.NumItems);
389-
sw.WriteLine("{0} /*Number of actions*/", header.NumActions);
390-
sw.WriteLine("{0} /*Number of Noun Verbs*/", header.NumNounVerbs);
391-
sw.WriteLine("{0} /*Number of Rooms*/", header.NumRooms);
388+
sw.WriteLine("{0} /*Number of items*/", header.NumItems-1);
389+
sw.WriteLine("{0} /*Number of actions*/", header.NumActions-1);
390+
sw.WriteLine("{0} /*Number of Noun Verbs*/", header.NumNounVerbs-1);
391+
sw.WriteLine("{0} /*Number of Rooms*/", header.NumRooms-1);
392392
sw.WriteLine("{0} /*Maximum carry*/", header.MaxCarry);
393-
sw.WriteLine("{0} /*Start toom*/", header.StartRoom);
393+
sw.WriteLine("{0} /*Start room*/", header.StartRoom);
394394
sw.WriteLine("{0} /*Total treasures*/", header.TotalTreasures);
395395
sw.WriteLine("{0} /*Word length*/", header.WordLength);
396396
sw.WriteLine("{0} /*Light duration*/", header.LightDuration);
397-
sw.WriteLine("{0} /*Number of messages*/", header.NumMessages);
397+
sw.WriteLine("{0} /*Number of messages*/", header.NumMessages-1);
398398
sw.WriteLine("{0} /*Treasure room*/", header.TreasureRoom);
399399

400400
//produces an array of arrays
@@ -478,8 +478,6 @@ public static void SaveAsCommentedDat(string pFile)
478478
sw.WriteLine("{0} /*Adventure number*/", footer.AdventureNumber);
479479
sw.WriteLine("{0} /*Unknown*/", footer.Unknown);
480480
}
481-
482-
483481
}
484482
}
485483
}

GameEngine/GameData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Diagnostics;
34
using System.IO;
45
using System.Linq;
56

@@ -194,7 +195,6 @@ public static GameData Load(string pFile)
194195
for (ctr = 0; ctr < gd.Header.NumActions; ctr++)
195196
Actions.Add(new Action(DATToChunks.GetTokensAsInt(8)));
196197

197-
198198
#endregion
199199

200200
#region Words

0 commit comments

Comments
 (0)