Skip to content

Commit

Permalink
Small bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Wincent01 committed Mar 8, 2020
1 parent d10c20a commit b39c036
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions InfectedRose.Interface/ZoneManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ public static async Task GenerateZoneAsync(string file)

await zone.SaveAsync(Path.Combine(Interface.Configuration.Output, "maps"));

Console.WriteLine("Saved, running through checks.");

await RunChecksAsync(zone);

Console.WriteLine("Adding zone to database.");

var zones = Interface.Database["ZoneTable"];
Expand All @@ -57,39 +53,5 @@ public static async Task GenerateZoneAsync(string file)
DisplayDescription = zone.Description
};
}

private static async Task RunChecksAsync(Zone zone)
{
var name = Path.GetFileName(zone.Name);

var file = new LuzFile();

Console.WriteLine($"Checking: {name}...");

await using (var stream = File.OpenRead(name))
{
using var reader = new BitReader(stream);

file.Deserialize(reader);
}

Console.WriteLine("Passed");

foreach (var scene in file.Scenes)
{
var lvl = new LvlFile();

Console.WriteLine($"Checking: {scene.FileName}...");

await using (var stream = File.OpenRead(scene.FileName))
{
using var reader = new BitReader(stream);

lvl.Deserialize(reader);
}

Console.WriteLine("Passed");
}
}
}
}

0 comments on commit b39c036

Please sign in to comment.