mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 23:24:52 +09:00
Using real textures of belts from spritesheet instead of icons
This commit is contained in:
1 parent
1a434b0537
commit
d5d02aa80d
3 files changed
+69
-11
No files matched your search
@@ -19,12 +19,13 @@ directories.forEach(path => {
|
||||
});
|
||||
});
|
||||
|
||||
function download(url, file){
|
||||
function download(url, file, callback){
|
||||
var writeStream = fs.createWriteStream(file);
|
||||
var request = http.get(url, function(response) {
|
||||
response.pipe(writeStream);
|
||||
response.on("end", () => {
|
||||
console.log("Downloaded "+file+" from "+url)
|
||||
if(callback && typeof callback == "function") callback(file);
|
||||
console.log("Downloaded "+file+" from "+url);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -32,7 +33,10 @@ function download(url, file){
|
||||
let downloadList = [
|
||||
{
|
||||
url: "http://fbpviewer.trakos.pl/images/spritesheet.json",
|
||||
file: "static/pictures/spritesheet.json",
|
||||
file: "static/pictures/spritesheet.js",
|
||||
callback: function(file){
|
||||
fs.writeFileSync("static/pictures/spritesheet.js", "export default\n"+fs.readFileSync("static/pictures/spritesheet.js"));
|
||||
},
|
||||
},
|
||||
{
|
||||
url: "http://fbpviewer.trakos.pl/images/spritesheet.png",
|
||||
@@ -40,7 +44,7 @@ let downloadList = [
|
||||
},
|
||||
]
|
||||
downloadList.forEach(item => {
|
||||
download(item.url, item.file);
|
||||
download(item.url, item.file, item.callback);
|
||||
});
|
||||
|
||||
// generate SSL certificates if they are missing
|
||||
|
||||
Reference in new issue
Block a user