2024-05-27 18:26:44 -04:00
|
|
|
class Entity {
|
|
|
|
get Name() {
|
|
|
|
return this._decoder.decode(new Uint8Array(this._ptr.slice(0, 24)));
|
|
|
|
}
|
|
|
|
set Name(v) {
|
|
|
|
this._data.set(this._encoder.encode(v), 0);
|
|
|
|
}
|
|
|
|
get Strength() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(24, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Strength(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(24, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Endurance() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(25, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Endurance(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(25, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Intelligence() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(26, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Intelligence(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(26, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Wisdom() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(27, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Wisdom(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(27, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Charisma() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(28, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Charisma(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(28, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Faith() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(29, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Faith(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(29, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Artisan() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(30, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Artisan(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(30, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Metalworking() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(31, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Metalworking(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(31, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Alchemy() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(32, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Alchemy(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(32, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Engineering() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(33, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Engineering(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(33, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Culinary() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(34, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Culinary(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(34, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Ranged() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(35, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Ranged(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(35, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Melee() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(36, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Melee(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(36, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Acrobatics() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(37, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Acrobatics(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(37, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Prestidigitation() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(38, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Prestidigitation(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(38, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Language() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(39, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Language(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(39, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Medicine() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(40, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Medicine(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(40, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
2024-05-27 21:05:31 -04:00
|
|
|
get Thaumatology() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(41, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
2024-05-27 21:05:31 -04:00
|
|
|
set Thaumatology(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(41, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Theology() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(42, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Theology(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(42, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Fishing() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(43, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Fishing(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(43, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Mining() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(44, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Mining(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(44, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Survival() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(45, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Survival(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(45, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Gardening() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(46, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Gardening(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(46, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get History() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(47, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set History(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(47, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Perception() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(48, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Perception(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(48, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Luck() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(49, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Luck(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(49, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Stealth() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(50, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Stealth(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(50, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Attractiveness() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(51, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Attractiveness(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(51, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Affluence() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(52, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Affluence(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(52, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get Notoriety() {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.getUint8(53, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
set Notoriety(v) {
|
2024-05-27 20:19:37 -04:00
|
|
|
return this._data.setUint8(53, v, true);
|
2024-05-27 18:26:44 -04:00
|
|
|
}
|
|
|
|
get bytes() {
|
|
|
|
return new Uint8Array(this._ptr);
|
|
|
|
}
|
|
|
|
constructor(init = {}, ptr = undefined) {
|
2024-05-27 20:19:37 -04:00
|
|
|
this._size = 54;
|
2024-05-27 18:26:44 -04:00
|
|
|
this._ptr = ptr.buffer || new ArrayBuffer(this._size);
|
|
|
|
this._data = new DataView(this._ptr);
|
|
|
|
|
|
|
|
this._encoder = new TextEncoder();
|
|
|
|
this._decoder = new TextDecoder();
|
|
|
|
for (const key of Object.keys(init)) {
|
|
|
|
this[key] = init[key];
|
|
|
|
}
|
|
|
|
}
|
2024-05-27 19:26:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export default Entity
|