v0.18.60
This commit is contained in:
@@ -12,7 +12,7 @@ namespace AssetStudio
|
||||
|
||||
public static void BuildMap(List<string> files, Game game)
|
||||
{
|
||||
Logger.Info(string.Format("Building {0}", game.MapName));
|
||||
Logger.Info($"Building {game.Name}Map");
|
||||
try
|
||||
{
|
||||
int collisions = 0;
|
||||
@@ -50,7 +50,7 @@ namespace AssetStudio
|
||||
}
|
||||
|
||||
CABMap = CABMap.OrderBy(pair => pair.Key).ToDictionary(pair => pair.Key, pair => pair.Value);
|
||||
var outputFile = new FileInfo($"Maps/{game.MapName}.bin");
|
||||
var outputFile = new FileInfo($"Maps/{game.Name}Map.bin");
|
||||
|
||||
if (!outputFile.Directory.Exists)
|
||||
outputFile.Directory.Create();
|
||||
@@ -71,20 +71,20 @@ namespace AssetStudio
|
||||
}
|
||||
}
|
||||
}
|
||||
Logger.Info($"{game.MapName} build successfully, {collisions} collisions found !!");
|
||||
Logger.Info($"{game.Name}Map build successfully, {collisions} collisions found !!");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Warning($"{game.MapName} was not build, {e.Message}");
|
||||
Logger.Warning($"{game.Name}Map was not build, {e.Message}");
|
||||
}
|
||||
}
|
||||
public static void LoadMap(Game game)
|
||||
{
|
||||
Logger.Info(string.Format("Loading {0}", game.MapName));
|
||||
Logger.Info($"Loading {game.Name}Map");
|
||||
try
|
||||
{
|
||||
CABMap.Clear();
|
||||
using (var binaryFile = File.OpenRead($"Maps/{game.MapName}.bin"))
|
||||
using (var binaryFile = File.OpenRead($"Maps/{game.Name}Map.bin"))
|
||||
using (var reader = new BinaryReader(binaryFile))
|
||||
{
|
||||
var count = reader.ReadInt32();
|
||||
@@ -103,11 +103,11 @@ namespace AssetStudio
|
||||
CABMap.Add(cab, new Entry(path, offset, dependencies));
|
||||
}
|
||||
}
|
||||
Logger.Info(string.Format("Loaded {0} !!", game.MapName));
|
||||
Logger.Info($"Loaded {game.Name}Map !!");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Warning($"{game.Name} was not loaded, {e.Message}");
|
||||
Logger.Warning($"{game.Name}Map was not loaded, {e.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user