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

166 lines
3.8 KiB
JavaScript

class Skills {
/**
* Crafting, visual arts, etc.
*/
get Artisan() {
return this._data.getUint8(0, true);
}
set Artisan(v) {
return this._data.setUint8(0, v, true);
}
/**
* cooking, baking, brewing,
*/
get Culinary() {
return this._data.getUint8(1, true);
}
set Culinary(v) {
return this._data.setUint8(1, v, true);
}
/**
* using guns/cannons, bows, etc.
*/
get Ranged() {
return this._data.getUint8(2, true);
}
set Ranged(v) {
return this._data.setUint8(2, v, true);
}
/**
* using swords, hammers, pole-arms etc.
*/
get Melee() {
return this._data.getUint8(3, true);
}
set Melee(v) {
return this._data.setUint8(3, v, true);
}
/**
* being able to contort, move, dodge, etc.
*/
get Acrobatics() {
return this._data.getUint8(4, true);
}
set Acrobatics(v) {
return this._data.setUint8(4, v, true);
}
/**
* skullduggery, lock-picking, deceiving, slight of hand
*/
get Prestidigitation() {
return this._data.getUint8(5, true);
}
set Prestidigitation(v) {
return this._data.setUint8(5, v, true);
}
/**
* creating and using contraptions, building houses
*/
get Engineering() {
return this._data.getUint8(6, true);
}
set Engineering(v) {
return this._data.setUint8(6, v, true);
}
/**
* obvious, but in this you can also use automatic stuff
*/
get Metalworking() {
return this._data.getUint8(7, true);
}
set Metalworking(v) {
return this._data.setUint8(7, v, true);
}
/**
* ability to read/write a specific language
*/
get Language() {
return this._data.getUint8(8, true);
}
set Language(v) {
return this._data.setUint8(8, v, true);
}
/**
* healing hp, getting rid of diseases, etc.
*/
get Medicine() {
return this._data.getUint8(9, true);
}
set Medicine(v) {
return this._data.setUint8(9, v, true);
}
/**
* Creating potions, creating alloys, creating chemicals, component based 'magic'
*/
get Alchemy() {
return this._data.getUint8(10, true);
}
set Alchemy(v) {
return this._data.setUint8(10, v, true);
}
/**
* collecting fish
*/
get Fishing() {
return this._data.getUint8(11, true);
}
set Fishing(v) {
return this._data.setUint8(11, v, true);
}
/**
* collecting ore
*/
get Mining() {
return this._data.getUint8(12, true);
}
set Mining(v) {
return this._data.setUint8(12, v, true);
}
/**
* woodcutting, fire-making, hunting, collecting herbs, etc.
*/
get Survival() {
return this._data.getUint8(13, true);
}
set Survival(v) {
return this._data.setUint8(13, v, true);
}
/**
* growing plants, herbs, etc.
*/
get Gardening() {
return this._data.getUint8(14, true);
}
set Gardening(v) {
return this._data.setUint8(14, v, true);
}
/**
* will give more information when examining some objects
*/
get History() {
return this._data.getUint8(15, true);
}
set History(v) {
return this._data.setUint8(15, v, true);
}
/**
* get the struct representation of the object
*/
get bytes() {
return new Uint8Array(this._ptr);
}
/**
* constructor
*/
constructor(init = {}, ptr = undefined) {
this._size = 16;
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