From 81f35998dcff72c55e052ec1ffbedfc38366fd34 Mon Sep 17 00:00:00 2001 From: Damian-I Date: Tue, 18 Feb 2025 15:19:02 +0000 Subject: [PATCH 1/7] Add tablet object to reception room and game scenario - Load tablet image asset - Add tablet object to reception room JSON - Include tablet with locked status and contents in game scenario - Add meeting notes and master key to tablet contents --- assets/rooms/room_reception.json | 12 ++++++++++++ assets/scenarios/ceo_exfil.json | 25 +++++++++++++++++++++++++ index.html | 1 + 3 files changed, 38 insertions(+) diff --git a/assets/rooms/room_reception.json b/assets/rooms/room_reception.json index 38d006c..3601459 100644 --- a/assets/rooms/room_reception.json +++ b/assets/rooms/room_reception.json @@ -222,6 +222,18 @@ "width":48, "x":236.666666666667, "y":168.666666666667 + }, + { + "gid":242, + "height":48, + "id":11, + "name":"tablet", + "rotation":0, + "type":"", + "visible":true, + "width":48, + "x":384, + "y":336 }], "opacity":1, "type":"objectgroup", diff --git a/assets/scenarios/ceo_exfil.json b/assets/scenarios/ceo_exfil.json index ead7d23..3f863ae 100644 --- a/assets/scenarios/ceo_exfil.json +++ b/assets/scenarios/ceo_exfil.json @@ -30,6 +30,31 @@ "takeable": false, "requires": "password", "observations": "The reception's computer, currently locked" + }, + { + "type": "tablet", + "name": "Forgotten Tablet", + "observations": "A tablet device left behind by someone. It seems to be locked.", + "locked": true, + "lockType": "pin", + "requires": "1234", + "contents": [ + { + "type": "notes", + "name": "Meeting Notes", + "observations": "Confidential meeting notes about upcoming projects", + "readable": true, + "text": "Project Aurora launch scheduled for Q3. Security concerns need to be addressed.", + "takeable": true + }, + { + "type": "key", + "name": "Master Key", + "observations": "A key with high security markings", + "takeable": true, + "key_id": "master_key" + } + ] } ] }, diff --git a/index.html b/index.html index f793cca..9dc6315 100644 --- a/index.html +++ b/index.html @@ -222,6 +222,7 @@ this.load.image('safe', 'assets/objects/safe.png'); this.load.image('book', 'assets/objects/book.png'); this.load.image('workstation', 'assets/objects/workstation.png'); + this.load.image('tablet', 'assets/objects/tablet.png'); this.load.json('gameScenarioJSON', 'assets/scenarios/ceo_exfil.json'); gameScenario = this.cache.json.get('gameScenarioJSON'); From 6c9db12f494867b42fb50bdbda2c40cc634d4ec6 Mon Sep 17 00:00:00 2001 From: Damian-I Date: Tue, 18 Feb 2025 16:19:37 +0000 Subject: [PATCH 2/7] Update game assets and scenario with bluetooth scanner and tablet adjustments - Add bluetooth scanner image asset - Modify tablet object in reception room JSON - Simplify tablet scenario contents and positioning - Adjust tablet object properties in game scenario --- assets/objects/bluetooth_scanner.png | Bin 0 -> 5700 bytes assets/objects/tablet.png | Bin 0 -> 6061 bytes assets/objects/workstation.png | Bin 0 -> 5704 bytes assets/rooms/room_reception.json | 8 ++++---- assets/scenarios/ceo_exfil.json | 22 +++------------------- index.html | 2 ++ 6 files changed, 9 insertions(+), 23 deletions(-) create mode 100644 assets/objects/bluetooth_scanner.png create mode 100644 assets/objects/tablet.png create mode 100644 assets/objects/workstation.png diff --git a/assets/objects/bluetooth_scanner.png b/assets/objects/bluetooth_scanner.png new file mode 100644 index 0000000000000000000000000000000000000000..cd0be1afb970a4193d0f752694b802f2f1b925ef GIT binary patch literal 5700 zcmeHLdpuP6`yb`bghi+@CW~b5Gng?G%ec%kNW$dSF>{8AximA(u!>S`RxT5%-4$IF z)rzzwWT{=(ZPR5-B?_squC2|Y_IpNZ>-GEo)9dy7{@2XwoH^(7JkR@ip7-;7KIeQU zGtl1~uDwDV27|#FKJ*~y7YiNsn(EMbI^bRk45qS^=iw2^@bEy0#6m7F0ffQqIu9s( z?da=QwWJaDQcd>cHAimt)N0>oIP7xQ7RXDrKcQTJ8kLDI;*9^l;61K%<5C?dwnOtYcfaF7IACfYT4Dp zIT3*~QA1ui(MGo0mYu$qXPC82=j&Y;I4UdE642yAQHd!0VfE*(&W8ss^^=-IwlvSz zmZbpG$7rNe(r+vF;agMFuAur-+#7O+MRg?VZHuy)uhqJwE8&> z6LVZ0VhgTW{#bjBbw~NVb7!d~uQgwgF};!U#&}tQOyg*#t2IjScX)l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3NS&SM3^XMgPuvCK)U*U2oC$5y(m$fu#gUijR6xtKBOvvyy8A^>CIpUzOztL5X<9> z7OWt$KhTu&xc`#%L2OFNLOSmU0-3+V{XqL|?hDG07L!S#3)zXv@ECL&Qt6+<5wdw4 z%EBd<{ph0u8AQ38A!HXm14dO;LP!5=bLi z+3|}#zX9C(=I+fDNZ>7q5Qv4gr2yt z0A%-O3|d~G)e7@&xmx5*N#p1lar6)_Y+;8==vxIK1%shcYUJkqZs%o zrIFKqx>FeD9eXNG^7lsr^a&~<7H;} zw8J6*23x{n(7yvjOFB#qLiH?@9XceM zh&@Nt!!idW>Q=nczA>xgUD$OCHHbm9SlE7LJMj{?6n-#u_mRT7ywhH8Y7^esv^~== zq-kpTH-D_$vP-k-FVn8h;B3CZ;mD5Y^t+Fos}m{_7g&bYG1MSq6luWOwCj9#?IArN z@3)EYLF2g$ZN_6+k(h(FD)_wMi_qbvxx-D_Km9ZqwohOjCpL!HIM1o%M(kr}zl>O$ZR79O_iA{p*YwJQgmbkO z^j$MLahpbM<0yRhuC9^YKe$!8{`_R)kJ+=MD*5vP`?l;a`;DO`nF5Q8n~c4+zH-Q% zZ@dw;gE{q=1LuYaKGMpY6rF$aYxd5Qw(*gkK8Q?slLw6UMb80Ym3y>`s=04cwadQV zLpo|}=c8KAnT(=Jr_H?g=H=#V{lR%@TH9_YuhKc*u*8bEv8hvar%AbnN~zW62d5j1 z(yP+dxB-#1Yv?F*!x|r*uz>=Uq@(z2j#>nI`xUna($f2M!%R9-F{7t4qcLaR-xgo` R-LP_3&hYf7pLO57^FM{B+5Z3l literal 0 HcmV?d00001 diff --git a/assets/objects/tablet.png b/assets/objects/tablet.png new file mode 100644 index 0000000000000000000000000000000000000000..2af66bc7817242c7f3bc3846f32dfcf4e888d95b GIT binary patch literal 6061 zcmeHLc|278_a9}CLS!kKCJ7m{W5$eR$&#JNk|kqiFqp;6FhfM7NVY7gL`cYk(t~Ud zDMF$>C3})&tsYv`_l}mQUcc`@yF_RQm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)q(zQXxs!>YcjsK1-(E^69NJ*7QQq_XNx5R0L$+TqK4}aW(sjD`Cg`8@F=`r6&()ib=9>lojaKr0 zKzvnt)LTh;D?w;Df>7?&tx{8C&N(cl5$VBrbqOLh4Kj2N6EyUbYvmT5j4`q}MKxql zRmR2a?%AI^Wws{i#3g_G7c_yt-oIIV^6q8R@-k}DGEFQ`@I}+xccD{B@!f-W@4iWz zxnCL|FmpEZPNHnGVbg|7%?qV+-s6b*oUXt~^Vr@R_Y}`Al-T$#sz<=Gv&r5CNqx64 zEhlpmXXjHAlR{^6k1E9OklrU_*U{HC)*5=LQY{80Eg8Jjk{tia`k%SB`zk06+^EX) zYg=wnWY%+L4gOxl|DDnveZXmh7&dErElw(siA8VAU_q6(&D%0TDD8p5bQ{q$*Hd+=(i!V(%%~v?;s;BeAZtaYQ~&z2dFrO|L`$D>n4v!Iv!zax6puzearIN` zHE(9FqLI{K^mTdwN}N=2A7pH9tnCsfWA|raRf8E%o?$+6>|kLE;4}RI3#mBG2BQ z5<1pq(Bj`$lUZA~XVA-V_RtfN3yNo}iV*B!&~hAsKBgz@nPn-Qoi3-5yGT=s-EU|U zANNE=b38h+U^f4D(VH#_(ef+#0c)S7e|(e=Z@hq#S$(_?q1m?mn26=FNR8E8X?joi RYyRsG3sW1D3M22B{{WeZlD7Z= literal 0 HcmV?d00001 diff --git a/assets/objects/workstation.png b/assets/objects/workstation.png new file mode 100644 index 0000000000000000000000000000000000000000..00ab4684072a7bd430ef6c32da9b364b480e8f30 GIT binary patch literal 5704 zcmeHLX;>3i7Y>T-2v&APVx)*j_Jt%QqO3*@dx6LzLo$H~Sxf>66a_@Bin7R}eu`8O zMO$Q1KmiMipipJeYDEMAcPRv_R20;264C1O^^ec<^`FTzlbL(YdCxiTIrq-o?DX;S z)Yq}lfx%$9L>NqM3(wWnhvDi97m0;jUMvWM*>&b+ud#FU zUC^40-$66op4Ac-;jZ1b_sG#w-tIrwoqd^MzG1ZBX@B;flB(}a7Fw2X+d~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iat8y-*qy#>jj?Mw^Z9Qx-CrV+Wu(+&1c`TgJGQ_5hvYd+C6o@R}02)>uh7s`)0WdQn!5XBc5+JXp);7pp})?#0HBKn%_>+)pQVr zgk6z}JN*-P+Rju~Vhc!pq=JdsjdLe{ZQ5_Zw0#+tA__=Z2nO)?7xW!rn>Di5dpqR5KZiH&(!yprWqi@h6u z!s4gmg1S9PIi<(}(m{+pv1uebc0t;d-qr5Gj#Z^}^$UEBT6Y`)Lr)_a6fZw?cdm>( zWT}fg6V}r6qQl2{>+1??_bg21+zuS>;Lk?zX3OT)LA@-i_*>ekj%TABUCyL89ejL^ zS1+XU?xfpa@%@W=>vV(bs*5Kp;f4_b{fS*cx(cm#u4S7|X=fVZ<5xO|8zwj1nziq@ zD&63u7mH2!d8QT5mVEPLeOKFZqb$#AdCoqV?%OWdt1Ow^Wm=Mk_SnKj?0wv+J(b^F z8W-1p#^90ecTbY9?eN~Yj~T0ohW`;Xn72$a2JX#sBf@&Q@}3~;uq4~tqbcvwhiyB} zcFh6~?tW4g;nA7TOBHJ5dKqbT?9jOIW}aEjNU(3@3ga%9xV)+tj|P6(v0?fT()H`j z*SM+3F=hax++#F7!qU4tPM;v(*L~-??a%P<-LMp16zk3O4a3 zPF`tpbX4A2+Lt+R#HU)~Vb;_=9qQCDRzS4w?5uuHb$;hiTvAgx-nsvn_e53pE{oe9 RFO@rUhP#*BDVK;X{{?$3?z8{^ literal 0 HcmV?d00001 diff --git a/assets/rooms/room_reception.json b/assets/rooms/room_reception.json index 3601459..5874416 100644 --- a/assets/rooms/room_reception.json +++ b/assets/rooms/room_reception.json @@ -224,7 +224,6 @@ "y":168.666666666667 }, { - "gid":242, "height":48, "id":11, "name":"tablet", @@ -232,9 +231,10 @@ "type":"", "visible":true, "width":48, - "x":384, - "y":336 - }], + "x":340, + "y":168 + } + ], "opacity":1, "type":"objectgroup", "visible":true, diff --git a/assets/scenarios/ceo_exfil.json b/assets/scenarios/ceo_exfil.json index 3f863ae..efad55b 100644 --- a/assets/scenarios/ceo_exfil.json +++ b/assets/scenarios/ceo_exfil.json @@ -33,28 +33,12 @@ }, { "type": "tablet", - "name": "Forgotten Tablet", - "observations": "A tablet device left behind by someone. It seems to be locked.", + "name": "Tablet Device", + "takeable": true, "locked": true, "lockType": "pin", "requires": "1234", - "contents": [ - { - "type": "notes", - "name": "Meeting Notes", - "observations": "Confidential meeting notes about upcoming projects", - "readable": true, - "text": "Project Aurora launch scheduled for Q3. Security concerns need to be addressed.", - "takeable": true - }, - { - "type": "key", - "name": "Master Key", - "observations": "A key with high security markings", - "takeable": true, - "key_id": "master_key" - } - ] + "observations": "A locked tablet device" } ] }, diff --git a/index.html b/index.html index 9dc6315..b842023 100644 --- a/index.html +++ b/index.html @@ -222,8 +222,10 @@ this.load.image('safe', 'assets/objects/safe.png'); this.load.image('book', 'assets/objects/book.png'); this.load.image('workstation', 'assets/objects/workstation.png'); + this.load.image('bluetooth_scanner', 'assets/objects/bluetooth_scanner.png'); this.load.image('tablet', 'assets/objects/tablet.png'); + this.load.json('gameScenarioJSON', 'assets/scenarios/ceo_exfil.json'); gameScenario = this.cache.json.get('gameScenarioJSON'); } From 5ae7000adb1e592c9e36f7cb389e4e7fbed1ce18 Mon Sep 17 00:00:00 2001 From: Damian-I Date: Tue, 18 Feb 2025 16:20:48 +0000 Subject: [PATCH 3/7] Add bluetooth scanner to reception room and game scenario - Add bluetooth scanner object to reception room JSON - Include bluetooth scanner in game scenario with description - Position bluetooth scanner near other interactive objects --- assets/rooms/room_reception.json | 11 +++++++++++ assets/scenarios/ceo_exfil.json | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/assets/rooms/room_reception.json b/assets/rooms/room_reception.json index 5874416..018fc41 100644 --- a/assets/rooms/room_reception.json +++ b/assets/rooms/room_reception.json @@ -233,6 +233,17 @@ "width":48, "x":340, "y":168 + }, + { + "height":48, + "id":12, + "name":"bluetooth_scanner", + "rotation":0, + "type":"", + "visible":true, + "width":48, + "x":380, + "y":166 } ], "opacity":1, diff --git a/assets/scenarios/ceo_exfil.json b/assets/scenarios/ceo_exfil.json index efad55b..4134eb0 100644 --- a/assets/scenarios/ceo_exfil.json +++ b/assets/scenarios/ceo_exfil.json @@ -39,6 +39,12 @@ "lockType": "pin", "requires": "1234", "observations": "A locked tablet device" + }, + { + "type": "bluetooth_scanner", + "name": "Bluetooth Scanner", + "takeable": true, + "observations": "A device for detecting nearby Bluetooth signals" } ] }, From 791230c72cbc6bd82070d7e9da3423da26f76307 Mon Sep 17 00:00:00 2001 From: Damian-I Date: Tue, 18 Feb 2025 16:29:37 +0000 Subject: [PATCH 4/7] Added the same MAC address to the scanner as the tablet --- assets/scenarios/ceo_exfil.json | 11 ++++--- index.html | 52 ++++++++++++++++++--------------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/assets/scenarios/ceo_exfil.json b/assets/scenarios/ceo_exfil.json index 4134eb0..1282d4e 100644 --- a/assets/scenarios/ceo_exfil.json +++ b/assets/scenarios/ceo_exfil.json @@ -36,15 +36,18 @@ "name": "Tablet Device", "takeable": true, "locked": true, - "lockType": "pin", - "requires": "1234", - "observations": "A locked tablet device" + "lockType": "bluetooth", + "requires": "00:11:22:33:44:55", + "mac": "00:11:22:33:44:55", + "observations": "A locked tablet device that requires Bluetooth pairing" }, { "type": "bluetooth_scanner", "name": "Bluetooth Scanner", "takeable": true, - "observations": "A device for detecting nearby Bluetooth signals" + "observations": "A device for detecting nearby Bluetooth signals", + "canScanBluetooth": true, + "mac": "00:11:22:33:44:55" } ] }, diff --git a/index.html b/index.html index b842023..2231b21 100644 --- a/index.html +++ b/index.html @@ -222,9 +222,8 @@ this.load.image('safe', 'assets/objects/safe.png'); this.load.image('book', 'assets/objects/book.png'); this.load.image('workstation', 'assets/objects/workstation.png'); - this.load.image('bluetooth_scanner', 'assets/objects/bluetooth_scanner.png'); this.load.image('tablet', 'assets/objects/tablet.png'); - + this.load.image('bluetooth_scanner', 'assets/objects/bluetooth_scanner.png'); this.load.json('gameScenarioJSON', 'assets/scenarios/ceo_exfil.json'); gameScenario = this.cache.json.get('gameScenarioJSON'); @@ -1406,10 +1405,22 @@ } const data = sprite.scenarioData; + let message = `${data.name}\n\n`; + message += `Observations: ${data.observations}\n\n`; - // Check if this is an unlocked container that hasn't been collected yet - if (data.isUnlockedButNotCollected && data.contents) { - let message = `You found the following items:\n`; + // Check for locked state in scenarioData + if (data.locked === true) { + console.log('Item is locked:', data); + handleUnlock(sprite, 'item'); + return; + } + + if (data.readable && data.text) { + message += `Text: ${data.text}\n\n`; + } + + if (data.contents && data.contents.length > 0) { + message += `You found the following items:\n`; data.contents.forEach(item => { message += `- ${item.name}\n`; }); @@ -1425,27 +1436,12 @@ addToInventory(contentSprite); } }); - + // Clear contents after adding to inventory data.contents = []; - data.isUnlockedButNotCollected = false; return; } - // Check for locked state in scenarioData - if (data.locked === true) { - console.log('Item is locked:', data); - handleUnlock(sprite, 'item'); - return; - } - - let message = `${data.name}\n\n`; - message += `Observations: ${data.observations}\n\n`; - - if (data.readable && data.text) { - message += `Text: ${data.text}\n\n`; - } - if (data.takeable) { message += `This item can be taken\n\n`; @@ -1842,7 +1838,7 @@ } } - // Modify the unlockTarget function + // Generic unlock function function unlockTarget(lockable, type, layer) { if (type === 'door') { if (!layer) { @@ -1857,15 +1853,23 @@ // Set new state for containers with contents if (lockable.scenarioData.contents) { lockable.scenarioData.isUnlockedButNotCollected = true; - return; // Return early to prevent automatic collection } } else { lockable.locked = false; if (lockable.contents) { lockable.isUnlockedButNotCollected = true; - return; // Return early to prevent automatic collection } } + + // If the item has contents, make them accessible + if (lockable.scenarioData?.contents) { + lockable.scenarioData.contents.forEach(item => { + const sprite = createInventorySprite(item); + if (sprite) { + addToInventory(sprite); + } + }); + } } } From a94b8fe40ca05aac20364e4e1ed57b66b890ce9f Mon Sep 17 00:00:00 2001 From: Damian-I Date: Tue, 18 Feb 2025 16:47:27 +0000 Subject: [PATCH 5/7] Added unlocking funcitonality when scanner is in the inventory --- assets/scenarios/ceo_exfil.json | 1 - index.html | 100 +- indexbt.html | 2080 +++++++++++++++++++++++++++++++ 3 files changed, 2152 insertions(+), 29 deletions(-) create mode 100644 indexbt.html diff --git a/assets/scenarios/ceo_exfil.json b/assets/scenarios/ceo_exfil.json index 1282d4e..701d051 100644 --- a/assets/scenarios/ceo_exfil.json +++ b/assets/scenarios/ceo_exfil.json @@ -37,7 +37,6 @@ "takeable": true, "locked": true, "lockType": "bluetooth", - "requires": "00:11:22:33:44:55", "mac": "00:11:22:33:44:55", "observations": "A locked tablet device that requires Bluetooth pairing" }, diff --git a/index.html b/index.html index 2231b21..77d5cae 100644 --- a/index.html +++ b/index.html @@ -222,8 +222,9 @@ this.load.image('safe', 'assets/objects/safe.png'); this.load.image('book', 'assets/objects/book.png'); this.load.image('workstation', 'assets/objects/workstation.png'); - this.load.image('tablet', 'assets/objects/tablet.png'); this.load.image('bluetooth_scanner', 'assets/objects/bluetooth_scanner.png'); + this.load.image('tablet', 'assets/objects/tablet.png'); + this.load.json('gameScenarioJSON', 'assets/scenarios/ceo_exfil.json'); gameScenario = this.cache.json.get('gameScenarioJSON'); @@ -1405,22 +1406,10 @@ } const data = sprite.scenarioData; - let message = `${data.name}\n\n`; - message += `Observations: ${data.observations}\n\n`; - // Check for locked state in scenarioData - if (data.locked === true) { - console.log('Item is locked:', data); - handleUnlock(sprite, 'item'); - return; - } - - if (data.readable && data.text) { - message += `Text: ${data.text}\n\n`; - } - - if (data.contents && data.contents.length > 0) { - message += `You found the following items:\n`; + // Check if this is an unlocked container that hasn't been collected yet + if (data.isUnlockedButNotCollected && data.contents) { + let message = `You found the following items:\n`; data.contents.forEach(item => { message += `- ${item.name}\n`; }); @@ -1436,12 +1425,27 @@ addToInventory(contentSprite); } }); - + // Clear contents after adding to inventory data.contents = []; + data.isUnlockedButNotCollected = false; return; } + // Check for locked state in scenarioData + if (data.locked === true) { + console.log('Item is locked:', data); + handleUnlock(sprite, 'item'); + return; + } + + let message = `${data.name}\n\n`; + message += `Observations: ${data.observations}\n\n`; + + if (data.readable && data.text) { + message += `Text: ${data.text}\n\n`; + } + if (data.takeable) { message += `This item can be taken\n\n`; @@ -1833,12 +1837,60 @@ } break; + case 'bluetooth': + const requiredMac = lockRequirements.requires; + // Find the scanner in inventory + const scanner = inventory.items.find(item => + item.scenarioData?.type === "bluetooth_scanner" + ); + + console.log('Bluetooth unlock attempt:', { + itemName: lockable.scenarioData?.name, + itemMac: lockable.scenarioData?.mac, + hasScanner: !!scanner + }); + + if (!scanner) { + alert("You need a Bluetooth scanner to unlock this device."); + // Don't return here - allow the item to be picked up even without scanner + if (type === 'item' && lockable.scenarioData?.takeable) { + addToInventory(lockable); + // Remove from room objects if it exists there + if (currentRoom && rooms[currentRoom].objects) { + delete rooms[currentRoom].objects[lockable.name]; + } + } + return; + } + + // If scanner is in inventory, automatically unlock the device + if (inventory.items.includes(scanner)) { + console.log('Bluetooth unlock success: Scanner in inventory', { + itemName: lockable.scenarioData?.name, + itemMac: lockable.scenarioData?.mac + }); + unlockTarget(lockable, type, lockable.layer); + alert(`Using Bluetooth scanner from inventory to unlock device.`); + return; + } + + const devices = getBluetoothDevicesInRange({ x: scanner.x, y: scanner.y }); + const matchingDevice = devices.find(d => d.mac === requiredMac && d.signalStrength >= BLUETOOTH_MIN_SIGNAL); + + if (matchingDevice) { + unlockTarget(lockable, type, lockable.layer); + alert(`Bluetooth connection established with ${matchingDevice.name}. Device unlocked.`); + } else { + alert("No compatible Bluetooth device in range or signal too weak."); + } + break; + default: alert(`Requires: ${lockRequirements.requires}`); } } - // Generic unlock function + // Modify the unlockTarget function function unlockTarget(lockable, type, layer) { if (type === 'door') { if (!layer) { @@ -1853,23 +1905,15 @@ // Set new state for containers with contents if (lockable.scenarioData.contents) { lockable.scenarioData.isUnlockedButNotCollected = true; + return; // Return early to prevent automatic collection } } else { lockable.locked = false; if (lockable.contents) { lockable.isUnlockedButNotCollected = true; + return; // Return early to prevent automatic collection } } - - // If the item has contents, make them accessible - if (lockable.scenarioData?.contents) { - lockable.scenarioData.contents.forEach(item => { - const sprite = createInventorySprite(item); - if (sprite) { - addToInventory(sprite); - } - }); - } } } diff --git a/indexbt.html b/indexbt.html new file mode 100644 index 0000000..b420d81 --- /dev/null +++ b/indexbt.html @@ -0,0 +1,2080 @@ + + + + + Office Adventure Game + + + + + +
+
Loading...
+
+ + + + From 1889b1b1d91304221bb126d093ffd3a768323d99 Mon Sep 17 00:00:00 2001 From: Damian-I Date: Tue, 18 Feb 2025 17:01:17 +0000 Subject: [PATCH 6/7] Implement Bluetooth device scanning and proximity-based unlocking - Add Bluetooth scanning constants and interval-based scanning - Modify object interaction to check for Bluetooth device proximity - Implement proximity-based unlocking for tablets - Add debug logging for Bluetooth scanning and device detection - Adjust tablet and scanner positioning in reception room ---- Fixed broken funcitons of previous bluetooth --- assets/rooms/room_reception.json | 4 +- index.html | 87 ++++++++++++++++++++++---------- indexbt.html | 8 --- 3 files changed, 62 insertions(+), 37 deletions(-) diff --git a/assets/rooms/room_reception.json b/assets/rooms/room_reception.json index 018fc41..eb88f44 100644 --- a/assets/rooms/room_reception.json +++ b/assets/rooms/room_reception.json @@ -231,8 +231,8 @@ "type":"", "visible":true, "width":48, - "x":340, - "y":168 + "x":430, + "y":380 }, { "height":48, diff --git a/index.html b/index.html index 77d5cae..290608d 100644 --- a/index.html +++ b/index.html @@ -190,6 +190,10 @@ const INTERACTION_RANGE = 2 * TILE_SIZE; const INTERACTION_RANGE_SQ = INTERACTION_RANGE * INTERACTION_RANGE; + // Bluetooth constants + const BLUETOOTH_SCAN_RANGE = TILE_SIZE * 2; // 2 tiles range for Bluetooth scanning + let lastBluetoothScan = 0; // Track last scan time + const BLUETOOTH_SCAN_INTERVAL = 500; // Scan every 500ms // preloads the assets function preload() { @@ -461,6 +465,13 @@ // checks for room transitions checkRoomTransitions.call(this); + // Check for Bluetooth devices + const currentTime = this.time.now; + if (currentTime - lastBluetoothScan >= BLUETOOTH_SCAN_INTERVAL) { + checkBluetoothDevices.call(this); + lastBluetoothScan = currentTime; + } + // adds a circle to the start of the path if (currentPath && currentPath.length > 0 && isMoving) { this.add.circle(currentPath[0].x, currentPath[0].y, 5, 0xff0000).setDepth(1000); @@ -1838,19 +1849,7 @@ break; case 'bluetooth': - const requiredMac = lockRequirements.requires; - // Find the scanner in inventory - const scanner = inventory.items.find(item => - item.scenarioData?.type === "bluetooth_scanner" - ); - - console.log('Bluetooth unlock attempt:', { - itemName: lockable.scenarioData?.name, - itemMac: lockable.scenarioData?.mac, - hasScanner: !!scanner - }); - - if (!scanner) { + if (lockable.scenarioData?.locked) { alert("You need a Bluetooth scanner to unlock this device."); // Don't return here - allow the item to be picked up even without scanner if (type === 'item' && lockable.scenarioData?.takeable) { @@ -1863,26 +1862,27 @@ return; } - // If scanner is in inventory, automatically unlock the device - if (inventory.items.includes(scanner)) { - console.log('Bluetooth unlock success: Scanner in inventory', { + // Calculate distance between player and tablet + const distance = Phaser.Math.Distance.Between( + player.x, player.y, + lockable.x, lockable.y + ); + + console.log('Distance to tablet:', distance); + + // Check if player is within range (using BLUETOOTH_SCAN_RANGE) + if (distance <= BLUETOOTH_SCAN_RANGE) { + console.log('Bluetooth unlock success: Player in range', { itemName: lockable.scenarioData?.name, - itemMac: lockable.scenarioData?.mac + itemMac: lockable.scenarioData?.mac, + distance: distance }); unlockTarget(lockable, type, lockable.layer); - alert(`Using Bluetooth scanner from inventory to unlock device.`); + alert(`Bluetooth connection established. Device unlocked.`); return; } - const devices = getBluetoothDevicesInRange({ x: scanner.x, y: scanner.y }); - const matchingDevice = devices.find(d => d.mac === requiredMac && d.signalStrength >= BLUETOOTH_MIN_SIGNAL); - - if (matchingDevice) { - unlockTarget(lockable, type, lockable.layer); - alert(`Bluetooth connection established with ${matchingDevice.name}. Device unlocked.`); - } else { - alert("No compatible Bluetooth device in range or signal too weak."); - } + alert("Too far from device to establish Bluetooth connection."); break; default: @@ -2110,6 +2110,39 @@ alert('You collected the items from the container.'); } + function checkBluetoothDevices() { + // Find scanner in inventory + const scanner = inventory.items.find(item => + item.scenarioData?.type === "bluetooth_scanner" + ); + + if (!scanner) return; + + // Find all tablets in the current room + if (!currentRoom || !rooms[currentRoom] || !rooms[currentRoom].objects) return; + + Object.values(rooms[currentRoom].objects).forEach(obj => { + if (obj.scenarioData?.type === "tablet" && obj.scenarioData?.locked) { + const distance = Phaser.Math.Distance.Between( + player.x, player.y, + obj.x, obj.y + ); + + if (distance <= BLUETOOTH_SCAN_RANGE) { + console.log('🔍 TABLET IN RANGE:', { + distance: Math.round(distance), + range: BLUETOOTH_SCAN_RANGE + }); + + // Unlock the tablet + obj.scenarioData.locked = false; + console.log('🔓 TABLET UNLOCKED!'); + alert('Bluetooth connection established. Device unlocked.'); + } + } + }); + } + \ No newline at end of file diff --git a/indexbt.html b/indexbt.html index b420d81..50c3784 100644 --- a/indexbt.html +++ b/indexbt.html @@ -1711,14 +1711,6 @@ return; } - // If scanner is in inventory, automatically unlock the device - if (inventory.items.includes(scanner)) { - unlockTarget(lockable, type, lockable.layer); - alert(`Using Bluetooth scanner from inventory to unlock device.`); - return; - } - - // Otherwise check signal strength based on position const devices = getBluetoothDevicesInRange({ x: scanner.x, y: scanner.y }); const matchingDevice = devices.find(d => d.mac === requiredMac && d.signalStrength >= BLUETOOTH_MIN_SIGNAL); From 168e729bd4b677e75809dcaba930235aefa1c65c Mon Sep 17 00:00:00 2001 From: Damian Idzinski <45018439+Damian-I@users.noreply.github.com> Date: Tue, 18 Feb 2025 17:11:12 +0000 Subject: [PATCH 7/7] Delete indexbt.html --- indexbt.html | 2072 -------------------------------------------------- 1 file changed, 2072 deletions(-) delete mode 100644 indexbt.html diff --git a/indexbt.html b/indexbt.html deleted file mode 100644 index 50c3784..0000000 --- a/indexbt.html +++ /dev/null @@ -1,2072 +0,0 @@ - - - - - Office Adventure Game - - - - - -
-
Loading...
-
- - - -