Skip to content

Commit 7cb7a90

Browse files
committed
Create folder per tile
Move tile name to end of filename to prevent file sorting problems
1 parent 075e183 commit 7cb7a90

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Source/MapComponents/MapComponent_RenderManager.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,10 @@ private string CreateFilePath(FileNamePattern fileNamePattern, bool addTmpSubdir
752752
{
753753
var subDir = Escape(Find.World.info.seedString, Path.GetInvalidPathChars());
754754
path = Path.Combine(path, subDir);
755+
if (!manuallyTriggered)
756+
{
757+
path = Path.Combine(path, "tile-" + map.Tile.ToString());
758+
}
755759
}
756760

757761
Directory.CreateDirectory(path);
@@ -809,15 +813,15 @@ private string CreateImageNameDateTime()
809813
var day = GenDate.DayOfQuadrum(tick, longitude) + 1;
810814
var hour = GenDate.HourInteger(tick, longitude);
811815
string mapName = PRModSettings.useMapNameInstead ? map.ToString() : map.Tile.ToString();
812-
return "rimworld-" + Find.World.info.seedString + "-" + mapName + "-" + year + "-" + quadrum + "-" +
813-
((day < 10) ? "0" : "") + day + "-" + ((hour < 10) ? "0" : "") + hour;
816+
return "rimworld-" + Find.World.info.seedString + "-" + year + "-" + quadrum + "-" +
817+
((day < 10) ? "0" : "") + day + "-" + ((hour < 10) ? "0" : "") + hour + "-" + mapName;
814818
}
815819

816820
private string CreateImageNameNumbered()
817821
{
818822
string mapName = PRModSettings.useMapNameInstead ? map.ToString() : map.Tile.ToString();
819-
return "rimworld-" + Find.World.info.seedString + "-" + mapName + "-" +
820-
lastRenderedCounter.ToString("000000");
823+
return "rimworld-" + Find.World.info.seedString + "-" +
824+
lastRenderedCounter.ToString("000000") + "-" + mapName;
821825
}
822826
}
823827
}

0 commit comments

Comments
 (0)