UNPKG

unreal.js

Version:

A pak reader for games like VALORANT & Fortnite written in Node.JS

34 lines (33 loc) 802 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AkFolder = void 0; class AkFolder { constructor(Ar) { this.offset = Ar.readUInt32(); this.id = Ar.readUInt32(); } populateName(Ar) { let str = ""; while (true) { try { const c = Ar.readString(); if (c === "") break; str += c; } catch { break; } } this.name = str; } toJson() { return { offset: this.offset, id: this.id, name: this.name, entries: this.entries.map(e => e.toJson()) }; } } exports.AkFolder = AkFolder;