Skip to content

Commit

Permalink
Revert touchzone changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SenkyDragon committed Dec 22, 2023
1 parent 298cb43 commit f78a8bb
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/main/GameDevice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import {BridgeSource} from "./bridge";

type allowedGetValues =
'TouchSelf'
| 'TouchSelfNew'
| 'TouchOthers'
| 'TouchOthersNew'
| 'PenSelf'
| 'PenOthers'
| 'FrotOthers'
Expand Down Expand Up @@ -97,15 +95,10 @@ export default class GameDevice {
const sources: BridgeSource[] = [];
if (!this.isTps) {
if (this.type === 'Orf') {
const getTouchLevel = (legacyClose: allowedGetBools, legacyLevel: allowedGetValues, newLevel: allowedGetValues) => {
const legacyVal = this.getBool(legacyClose) ? this.getNumber(legacyLevel) ?? 0 : 0;
const newVal = this.getNumber(newLevel);
return newVal ?? legacyVal;
}
sources.push(new BridgeSource('orf', this.id, 'touchSelf',
getTouchLevel('TouchSelfClose', 'TouchSelf', 'TouchSelfNew')));
this.getBool('TouchSelfClose') ? this.getNumber('TouchSelf') ?? 0 : 0));
sources.push(new BridgeSource('orf', this.id, 'touchOthers',
getTouchLevel('TouchOthersClose', 'TouchOthers', 'TouchOthersNew')));
this.getBool('TouchOthersClose') ? this.getNumber('TouchOthers') ?? 0 : 0));

const penSelfLegacy = this.getNumber('PenSelf');
const penSelfNew = this.getNewPenAmount(true);
Expand Down

0 comments on commit f78a8bb

Please sign in to comment.