@@ -252,12 +252,13 @@ <h2 id="journal-title">SIGNAL LOG</h2>
252252
253253 // Interaction targets reserve their tile so the player stops facing them.
254254 const npcOnTile = isTileOccupiedByNPC ( tx , ty , null ) ;
255- const fragmentOnTile = getUncollectedFragmentAt ( tx , ty ) ;
255+ const fragmentOnTile = getActiveFragmentAt ( tx , ty ) ;
256256 if ( npcOnTile || fragmentOnTile || ! isWalkable ( tx , ty ) ) {
257257 // BLOCKED
258258 player . state = 'BLOCKED' ;
259259 player . bumpDir = dir ;
260260 player . bumpProgress = 0 ;
261+ if ( fragmentOnTile && ! fragmentOnTile . discovered ) showStatus ( 'SIGNAL INTERFERENCE · SCAN' ) ;
261262 return ;
262263 }
263264
@@ -848,7 +849,7 @@ <h2 id="journal-title">SIGNAL LOG</h2>
848849// PATHFINDING
849850// ══════════════════════════════════════════════════════
850851function findPath ( sx , sy , ex , ey ) {
851- const isPlayerWalkable = ( x , y ) => isWalkable ( x , y ) && ! getUncollectedFragmentAt ( x , y ) ;
852+ const isPlayerWalkable = ( x , y ) => isWalkable ( x , y ) && ! getActiveFragmentAt ( x , y ) ;
852853 return findWorldPath ( sx , sy , ex , ey , isPlayerWalkable , { allowNearest : false } ) ;
853854}
854855
@@ -1024,6 +1025,14 @@ <h2 id="journal-title">SIGNAL LOG</h2>
10241025}
10251026
10261027function resetQuest ( ) {
1028+ const occupiedSignalSite = signalFragments . some ( fragment => (
1029+ entityOccupiesTile ( player , fragment . x , fragment . y ) ||
1030+ isTileReserved ( npcs , fragment . x , fragment . y , null )
1031+ ) ) ;
1032+ if ( occupiedSignalSite ) {
1033+ showStatus ( 'CLEAR SIGNAL SITES BEFORE RESTART' , 2.5 ) ;
1034+ return false ;
1035+ }
10271036 for ( const fragment of signalFragments ) {
10281037 fragment . discovered = false ;
10291038 fragment . collected = false ;
@@ -1035,6 +1044,7 @@ <h2 id="journal-title">SIGNAL LOG</h2>
10351044 updateQuestUI ( ) ;
10361045 updateJournal ( ) ;
10371046 showStatus ( 'SIGNAL SEARCH RESTARTED' , 2 ) ;
1047+ return true ;
10381048}
10391049
10401050function requestQuestReset ( confirmReset ) {
@@ -1069,6 +1079,7 @@ <h2 id="journal-title">SIGNAL LOG</h2>
10691079 journalDialog . showModal ( ) ;
10701080} ) ;
10711081journalClose . addEventListener ( 'click' , ( ) => journalDialog . close ( ) ) ;
1082+ journalDialog . addEventListener ( 'close' , ( ) => canvas . focus ( { preventScroll : true } ) ) ;
10721083function updateSoundButton ( ) {
10731084 const muted = feedback . isMuted ( ) ;
10741085 soundButton . classList . toggle ( 'muted' , muted ) ;
0 commit comments