@@ -2512,6 +2512,20 @@ async function createPhotoNoteFromActor(actor, isUnknown = false) {
25122512 return ;
25132513 }
25142514
2515+ // Get displayName using the helper function
2516+ let displayName = getActorDisplayName ( actor ) ;
2517+
2518+ // Override if isUnknown is true
2519+ if ( isUnknown ) {
2520+ displayName = "Unknown" ;
2521+ }
2522+
2523+ const imagePath = actor . img || "modules/investigation-board/assets/placeholder.webp" ;
2524+ const extraFlags = {
2525+ image : imagePath ,
2526+ ...( isUnknown ? { unknown : true } : { } )
2527+ } ;
2528+
25152529 const photoW = game . settings . get ( MODULE_ID , "photoNoteWidth" ) || 225 ;
25162530 const height = Math . round ( photoW / ( 225 / 290 ) ) ;
25172531
@@ -2540,7 +2554,7 @@ async function createPhotoNoteFromActor(actor, isUnknown = false) {
25402554 core : { sheetClass : "investigation-board.CustomDrawingSheet" }
25412555 } ,
25422556 ownership : { default : 3 }
2543- } ] ) ;
2557+ } ] , { skipAutoOpen : true } ) ;
25442558
25452559 // Handle interactivity in Investigation Board mode
25462560 if ( investigationBoardModeActive && created ?. [ 0 ] ) {
@@ -2603,7 +2617,7 @@ async function createPhotoNoteFromScene(targetScene) {
26032617 core : { sheetClass : "investigation-board.CustomDrawingSheet" }
26042618 } ,
26052619 ownership : { default : 3 }
2606- } ] ) ;
2620+ } ] , { skipAutoOpen : true } ) ;
26072621
26082622 if ( investigationBoardModeActive && created ?. [ 0 ] ) {
26092623 setTimeout ( ( ) => {
@@ -2682,7 +2696,7 @@ async function createHandoutNoteFromPage(page) {
26822696 core : { sheetClass : "investigation-board.CustomDrawingSheet" }
26832697 } ,
26842698 ownership : { default : 3 }
2685- } ] ) ;
2699+ } ] , { skipAutoOpen : true } ) ;
26862700
26872701 if ( investigationBoardModeActive && created ?. [ 0 ] ) {
26882702 setTimeout ( ( ) => {
@@ -3075,7 +3089,7 @@ Hooks.on("createDrawing", (drawing, options, userId) => {
30753089 if ( ! noteData ) return ;
30763090
30773091 // If this is the user who created the note, open the edit dialog
3078- if ( userId === game . user . id ) {
3092+ if ( userId === game . user . id && ! options . skipAutoOpen ) {
30793093 setTimeout ( ( ) => {
30803094 drawing . sheet . render ( true ) ;
30813095 } , 150 ) ;
@@ -3356,7 +3370,7 @@ async function createMediaNoteFromSound(sound) {
33563370 core : { sheetClass : "investigation-board.CustomDrawingSheet" }
33573371 } ,
33583372 ownership : { default : 3 }
3359- } ] ) ;
3373+ } ] , { skipAutoOpen : true } ) ;
33603374
33613375 if ( investigationBoardModeActive && created ?. [ 0 ] ) {
33623376 setTimeout ( ( ) => {
0 commit comments