Added some helpers to interpret the controllerType field

These aren't particularly useful, at least not to me, but I found them while perusing the official app, so I figured they couldn't hurt to have.
This commit is contained in:
2020-02-22 11:27:09 -06:00
parent ed99d411b2
commit a2d39e7463

View File

@ -107,4 +107,24 @@ exports.SLControllerConfigMessage = class SLControllerConfigMessage extends SLMe
hasIntellichem() {
return !!(this.equipFlags & 0x8000);
}
isEasyTouch() {
return this.controllerType === 14 || this.controllerType === 13;
}
isIntelliTouch() {
return this.controllerType !== 14 && this.controllerType !== 13 && this.controllerType !== 10;
}
isEasyTouchLite() {
return this.controllerType === 13 && (this.hwType & 4) !== 0;
}
isDualBody() {
return this.controllerType === 5;
}
isChem2() {
return this.controllerType === 252 && this.hwType === 2;
}
};