• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Automap (client) [VS plugin mod]


Commit MetaInfo

Revisão94a997fedb1dff51d608c4cca0d5579fb9eec74a (tree)
Hora2020-05-05 08:20:21
Autormelchior <melchior@user...>
Commitermelchior

Mensagem de Log

Changed shard (png) output to its own "Chunks" directory path

Mudança Sumário

Diff

--- a/Automap/Subsystems/AutomapSystem.cs
+++ b/Automap/Subsystems/AutomapSystem.cs
@@ -93,6 +93,8 @@ namespace Automap
9393 {
9494 path = ClientAPI.GetOrCreateDataPath(_mapPath);
9595 path = ClientAPI.GetOrCreateDataPath(Path.Combine(path, "World_" + ClientAPI.World.Seed));//Add name of World too...'ServerApi.WorldManager.CurrentWorldName'
96+ ClientAPI.GetOrCreateDataPath(Path.Combine(path, _chunkPath));
97+
9698 JsonGenerator = new JsonGenerator(ClientAPI, Logger, path);
9799
98100 string mapFilename = Path.Combine(path, "automap.html");
@@ -388,22 +390,22 @@ namespace Automap
388390 /// <returns>The metadata.</returns>
389391 private void Reload_Metadata()
390392 {
391- var worldmapDir = new DirectoryInfo(path);
393+ var shardsDir = new DirectoryInfo( Path.Combine(path, _chunkPath) );
392394
393- if (!worldmapDir.Exists)
395+ if (!shardsDir.Exists)
394396 {
395-#if DEBUG
396- Logger.VerboseDebug("Could not open world map directory");
397-#endif
397+ #if DEBUG
398+ Logger.VerboseDebug("Could not open world map (shards) directory");
399+ #endif
398400 return;
399401 }
400- var shardFiles = worldmapDir.GetFiles(chunkFile_filter);
402+ var shardFiles = shardsDir.GetFiles(chunkFile_filter);
401403
402404 if (shardFiles.Length > 0)
403405 {
404-#if DEBUG
406+ #if DEBUG
405407 Logger.VerboseDebug("Metadata reloading from {0} shards", shardFiles.Length);
406-#endif
408+ #endif
407409
408410 foreach (var shardFile in shardFiles)
409411 {
@@ -472,7 +474,7 @@ namespace Automap
472474 ImageInfo imageInf = new ImageInfo(chunkSize, chunkSize, 8, false);
473475
474476 string filename = $"{coord.X}_{coord.Y}.png";
475- filename = Path.Combine(path, filename);
477+ filename = Path.Combine(path, _chunkPath ,filename);
476478
477479 PngWriter pngWriter = FileHelper.CreatePngWriter(filename, imageInf, true);
478480 PngMetadata meta = pngWriter.GetMetadata();