From 224d7ac736fb91ef91489a9f1d2ffdfdf60a4e1b Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 17 Feb 2021 00:37:02 -0500 Subject: [PATCH] Remove furni limit --- .gitignore | 1 + error.log | 39 ------------------- .../furniture/FurnitureDownloader.ts | 6 --- src/utils/NitroBundle.ts | 7 +++- 4 files changed, 6 insertions(+), 47 deletions(-) diff --git a/.gitignore b/.gitignore index 6f97f44..9b39010 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ yarn-error.log testem.log /typings .git +error.log # System Files .DS_Store diff --git a/error.log b/error.log index d2c6f69..e69de29 100644 --- a/error.log +++ b/error.log @@ -1,39 +0,0 @@ -TypeError: NitroBundle_1.default is not a constructor -TypeError: NitroBundle_1.default is not a constructor -TypeError: NitroBundle_1.default is not a constructor -TypeError: NitroBundle_1.default is not a constructor -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function -TypeError: zlib_1.gzip.__promisify__ is not a function diff --git a/src/converters/furniture/FurnitureDownloader.ts b/src/converters/furniture/FurnitureDownloader.ts index 4be453b..84c3a98 100644 --- a/src/converters/furniture/FurnitureDownloader.ts +++ b/src/converters/furniture/FurnitureDownloader.ts @@ -18,8 +18,6 @@ export class FurnitureDownloader { try { - let count = 0; - const furniData = await this.parseFurniData(); const classNames: string[] = []; @@ -36,8 +34,6 @@ export class FurnitureDownloader const className = furniType.classname.split('*')[0]; const revision = furniType.revision; - if(count === 3) return; - if(classNames.indexOf(className) >= 0) continue; classNames.push(className); @@ -45,8 +41,6 @@ export class FurnitureDownloader try { await this.extractFurniture(revision, className, callback); - - count ++; } catch (error) diff --git a/src/utils/NitroBundle.ts b/src/utils/NitroBundle.ts index 63f8225..a81c84d 100644 --- a/src/utils/NitroBundle.ts +++ b/src/utils/NitroBundle.ts @@ -1,5 +1,8 @@ import * as ByteBuffer from 'bytebuffer'; -import { gzip } from 'zlib'; +import { promisify } from 'util'; +import * as zlib from 'zlib'; + +const gzip = promisify(zlib.gzip); export class NitroBundle { @@ -31,7 +34,7 @@ export class NitroBundle buffer.writeUint16(fileName.length); buffer.writeString(fileName); - const compressed = await gzip.__promisify__(file); + const compressed = await gzip(file); buffer.writeUint32(compressed.length); buffer.append(compressed);