novaparse
Version:
An EV Nova file parser for NovaJS
27 lines • 926 B
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const NovaResourceBase_1 = require("./NovaResourceBase");
class SpobResource extends NovaResourceBase_1.BaseResource {
constructor(resource, idSpace) {
super(resource, idSpace);
var d = resource.data;
this.position = [d.getInt16(0), d.getInt16(2)];
this.graphic = d.getInt16(4) + 2000;
if (this.graphic > 2058) {
this.graphic -= 1;
}
this.flags = d.getUint32(6);
this.tribute = d.getInt16(10);
this.techLevel = d.getInt16(12);
this.specialTech = [
d.getInt16(14),
d.getInt16(16),
d.getInt16(18)
];
this.government = d.getInt16(20);
this.landingPictID = d.getUint16(24);
this.landingDescID = this.id;
}
}
exports.SpobResource = SpobResource;
//# sourceMappingURL=SpobResource.js.map