mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
fix: 1.103.01 - parse old .map - add patch version
This commit is contained in:
parent
168203f7da
commit
637aa398bb
3 changed files with 6 additions and 3 deletions
|
|
@ -153,7 +153,10 @@ async function parseLoadedResult(result) {
|
|||
|
||||
const mapData = decoded.split("\r\n");
|
||||
const mapVersionString = mapData[0].split("|")[0] || mapData[0] || "";
|
||||
return [mapData, mapVersionString];
|
||||
const [major, minor, patch = "00"] = mapVersionString.split(".");
|
||||
const mapVersion = `${major}.${minor}.${patch}`;
|
||||
|
||||
return [mapData, mapVersion];
|
||||
} catch (error) {
|
||||
// map file can be compressed with gzip
|
||||
const uncompressedData = await uncompress(result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue