-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
85 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const fs = require('fs'); | ||
const execSync = require('child_process').execSync; | ||
const helpers = require('./atlastools/include/helpers.js') | ||
|
||
const baseDir = "DumpResources/server/ShooterGame/" | ||
const resourceDir = baseDir + "Binaries/Win64/resources/" | ||
const imgmgk = "DumpResources/imgmgk/" | ||
const workDir = process.cwd(); | ||
|
||
let items = helpers.parseJSONFile(resourceDir + "items.json"); | ||
|
||
for (item in items) { | ||
let i = items[item]; | ||
if (i.Icon) { | ||
console.log(i.Icon) | ||
execSync(`start /min ${imgmgk}convert "assets/${i.Icon}.TGA" -thumbnail 128 -format png -define png:compression-filter=5 -auto-orient -define png:compression-level=9 -quality 82 -define png:compression-strategy=1 "atlasicons/${i.Icon}_128.png"`) | ||
execSync(`start /min ${imgmgk}convert "assets/${i.Icon}.TGA" -thumbnail 64 -format png -define png:compression-filter=5 -auto-orient -define png:compression-level=9 -quality 82 -define png:compression-strategy=1 "atlasicons/${i.Icon}_64.png"`) | ||
execSync(`start /min ${imgmgk}convert "assets/${i.Icon}.TGA" -thumbnail 32 -format png -define png:compression-filter=5 -auto-orient -define png:compression-level=9 -quality 82 -define png:compression-strategy=1 "atlasicons/${i.Icon}_32.png"`) | ||
} | ||
} | ||
|
||
function sortObjByKey(value) { | ||
return (typeof value === 'object') ? | ||
(Array.isArray(value) ? | ||
value.map(sortObjByKey) : | ||
Object.keys(value).sort().reduce( | ||
(o, key) => { | ||
const v = value[key]; | ||
o[key] = sortObjByKey(v); | ||
return o; | ||
}, {}) | ||
) : | ||
value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mkdir DumpResources\imgmgk | ||
mkdir atlasicons | ||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://download.imagemagick.org/ImageMagick/download/binaries/ImageMagick-7.1.0-portable-Q16-x64.zip', 'DumpResources/imgmgk/imgmgk.zip')" | ||
tar -xf DumpResources/imgmgk/imgmgk.zip -C DumpResources/imgmgk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters