xcom2charpool
Version:
Library for reading, manipulating, and managing XCOM 2 character pool binary files, supporting both browser and Node.js environments.
17 lines (16 loc) • 419 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BoolProperty = void 0;
/**
* Represented by a single byte, 0x00 is False anything else is True
*/
class BoolProperty {
static from(reader, name, size) {
return reader.byte() !== 0x00;
}
static to(target, value) {
target.byte(value ? 1 : 0);
return 0;
}
}
exports.BoolProperty = BoolProperty;