raylib-wasm-transpiler/server/components/Skills.js

133 lines
3.9 KiB
JavaScript

class Skills {
get Artisan() {
return this._data.getUint8(0, true);
}
set Artisan(v) {
return this._data.setUint8(0, v, true);
}
get Metalworking() {
return this._data.getUint8(1, true);
}
set Metalworking(v) {
return this._data.setUint8(1, v, true);
}
get Alchemy() {
return this._data.getUint8(2, true);
}
set Alchemy(v) {
return this._data.setUint8(2, v, true);
}
get Engineering() {
return this._data.getUint8(3, true);
}
set Engineering(v) {
return this._data.setUint8(3, v, true);
}
get Culinary() {
return this._data.getUint8(4, true);
}
set Culinary(v) {
return this._data.setUint8(4, v, true);
}
get Ranged() {
return this._data.getUint8(5, true);
}
set Ranged(v) {
return this._data.setUint8(5, v, true);
}
get Melee() {
return this._data.getUint8(6, true);
}
set Melee(v) {
return this._data.setUint8(6, v, true);
}
get Acrobatics() {
return this._data.getUint8(7, true);
}
set Acrobatics(v) {
return this._data.setUint8(7, v, true);
}
get Prestidigitation() {
return this._data.getUint8(8, true);
}
set Prestidigitation(v) {
return this._data.setUint8(8, v, true);
}
get Language() {
return this._data.getUint8(9, true);
}
set Language(v) {
return this._data.setUint8(9, v, true);
}
get Medicine() {
return this._data.getUint8(10, true);
}
set Medicine(v) {
return this._data.setUint8(10, v, true);
}
get Thaumatology() {
return this._data.getUint8(11, true);
}
set Thaumatology(v) {
return this._data.setUint8(11, v, true);
}
get Theology() {
return this._data.getUint8(12, true);
}
set Theology(v) {
return this._data.setUint8(12, v, true);
}
get Fishing() {
return this._data.getUint8(13, true);
}
set Fishing(v) {
return this._data.setUint8(13, v, true);
}
get Mining() {
return this._data.getUint8(14, true);
}
set Mining(v) {
return this._data.setUint8(14, v, true);
}
get Survival() {
return this._data.getUint8(15, true);
}
set Survival(v) {
return this._data.setUint8(15, v, true);
}
get Gardening() {
return this._data.getUint8(16, true);
}
set Gardening(v) {
return this._data.setUint8(16, v, true);
}
get History() {
return this._data.getUint8(17, true);
}
set History(v) {
return this._data.setUint8(17, v, true);
}
get Perception() {
return this._data.getUint8(18, true);
}
set Perception(v) {
return this._data.setUint8(18, v, true);
}
sql_insert(Artisan, Metalworking, Alchemy, Engineering, Culinary, Ranged, Melee, Acrobatics, Prestidigitation, Language, Medicine, Thaumatology, Theology, Fishing, Mining, Survival, Gardening, History, Perception) {
return `INSERT INTO Skills (Artisan, Metalworking, Alchemy, Engineering, Culinary, Ranged, Melee, Acrobatics, Prestidigitation, Language, Medicine, Thaumatology, Theology, Fishing, Mining, Survival, Gardening, History, Perception) VALUES (${Artisan}, ${Metalworking}, ${Alchemy}, ${Engineering}, ${Culinary}, ${Ranged}, ${Melee}, ${Acrobatics}, ${Prestidigitation}, ${Language}, ${Medicine}, ${Thaumatology}, ${Theology}, ${Fishing}, ${Mining}, ${Survival}, ${Gardening}, ${History}, ${Perception}) RETURNING id;`
}
get bytes() {
return new Uint8Array(this._ptr);
}
constructor(init = {}, ptr = undefined) {
this._size = 19;
this._ptr = ptr.buffer || new ArrayBuffer(this._size);
this._data = new DataView(this._ptr);
for (const key of Object.keys(init)) {
this[key] = init[key];
}
}
}
export default Skills