From f75abe564d99cdb75d261d27d2974d4c3dbd0316 Mon Sep 17 00:00:00 2001 From: nak Date: Wed, 18 Mar 2026 09:04:31 +0000 Subject: [PATCH] Cleaning up some poker_sit code --- scripts/poker_sit.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/poker_sit.js b/scripts/poker_sit.js index b501651..d816fa2 100644 --- a/scripts/poker_sit.js +++ b/scripts/poker_sit.js @@ -112,8 +112,10 @@ } function onSit() { + print("[pokerSeat] onSit called, seat=" + _seatIndex + " isSeated=" + isSeated + " _busy=" + _busy + " _seatData=" + (_seatData ? "ok" : "null")); if (isSeated || _busy) return; _busy = true; + Script.setTimeout(function () { _busy = false; }, 3000); if (!_seatData) { notify("Seat not configured (index " + _seatIndex + ")"); @@ -191,7 +193,7 @@ var seatCount = getTableSeatCount(); var layout = POKER_SEATS[seatCount]; - if (!layout || !layout[parseInt(_seatIndex)]) { + if (!layout || layout[parseInt(_seatIndex)] === undefined) { print("[pokerSeat] no layout for seatCount=" + seatCount + " index=" + _seatIndex); return; } @@ -200,12 +202,12 @@ print("[pokerSeat] loaded seat " + _seatIndex + " at table " + _tableID); }; - this.clickDownOnEntity = function () { onSit(); }; - this.clickUpOnEntity = function () { _busy = false; }; this.startNearTrigger = function () { onSit(); }; - this.stopNearTrigger = function () { _busy = false; }; + this.stopNearTrigger = function () {}; this.startFarTrigger = function () { onSit(); }; - this.stopFarTrigger = function () { _busy = false; }; + this.stopFarTrigger = function () {}; + this.clickDownOnEntity = function () { onSit(); }; + this.clickUpOnEntity = function () {}; this.unload = function () { if (isSeated) {