@@ -269,12 +269,13 @@ <h2 id="journal-title">SIGNAL LOG</h2>
269269
270270 // Interaction targets reserve their tile so the player stops facing them.
271271 const npcOnTile = isTileOccupiedByNPC ( tx , ty , null ) ;
272- const fragmentOnTile = getUncollectedFragmentAt ( tx , ty ) ;
272+ const fragmentOnTile = getActiveFragmentAt ( tx , ty ) ;
273273 if ( npcOnTile || fragmentOnTile || ! isWalkable ( tx , ty ) ) {
274274 // BLOCKED
275275 player . state = 'BLOCKED' ;
276276 player . bumpDir = dir ;
277277 player . bumpProgress = 0 ;
278+ if ( fragmentOnTile && ! fragmentOnTile . discovered ) showStatus ( 'SIGNAL INTERFERENCE · SCAN' ) ;
278279 return ;
279280 }
280281
@@ -867,7 +868,7 @@ <h2 id="journal-title">SIGNAL LOG</h2>
867868// PATHFINDING
868869// ══════════════════════════════════════════════════════
869870function findPath ( sx , sy , ex , ey ) {
870- const isPlayerWalkable = ( x , y ) => isWalkable ( x , y ) && ! getUncollectedFragmentAt ( x , y ) ;
871+ const isPlayerWalkable = ( x , y ) => isWalkable ( x , y ) && ! getActiveFragmentAt ( x , y ) ;
871872 return findWorldPath ( sx , sy , ex , ey , isPlayerWalkable , { allowNearest : false } ) ;
872873}
873874
@@ -1046,6 +1047,14 @@ <h2 id="journal-title">SIGNAL LOG</h2>
10461047}
10471048
10481049function resetQuest ( ) {
1050+ const occupiedSignalSite = signalFragments . some ( fragment => (
1051+ entityOccupiesTile ( player , fragment . x , fragment . y ) ||
1052+ isTileReserved ( npcs , fragment . x , fragment . y , null )
1053+ ) ) ;
1054+ if ( occupiedSignalSite ) {
1055+ showStatus ( 'CLEAR SIGNAL SITES BEFORE RESTART' , 2.5 ) ;
1056+ return false ;
1057+ }
10491058 for ( const fragment of signalFragments ) {
10501059 fragment . discovered = false ;
10511060 fragment . collected = false ;
@@ -1058,6 +1067,7 @@ <h2 id="journal-title">SIGNAL LOG</h2>
10581067 updateJournal ( ) ;
10591068 showStatus ( 'SIGNAL SEARCH RESTARTED' , 2 ) ;
10601069 metrics . increment ( 'replays' ) ;
1070+ return true ;
10611071}
10621072
10631073function requestQuestReset ( confirmReset ) {
@@ -1092,6 +1102,7 @@ <h2 id="journal-title">SIGNAL LOG</h2>
10921102 journalDialog . showModal ( ) ;
10931103} ) ;
10941104journalClose . addEventListener ( 'click' , ( ) => journalDialog . close ( ) ) ;
1105+ journalDialog . addEventListener ( 'close' , ( ) => canvas . focus ( { preventScroll : true } ) ) ;
10951106function updateSoundButton ( ) {
10961107 const muted = feedback . isMuted ( ) ;
10971108 soundButton . classList . toggle ( 'muted' , muted ) ;
0 commit comments