@@ -71,9 +71,12 @@ interface NPCDesireCardProps {
7171 onOpenBDSMRelationship ?: ( npcId : string , npcName : string ) => void ;
7272 onOpenBDSMContract ?: ( npcId : string , npcName : string ) => void ;
7373 onOpenBDSMSafety ?: ( npcId : string , npcName : string ) => void ;
74+ onGenerateTasks ?: ( npcId : string , npcName : string ) => void ;
75+ onGenerateDailyInstructions ?: ( npcId : string , npcName : string ) => void ;
76+ onCheckStageAdvance ?: ( npcId : string , npcName : string ) => void ;
7477}
7578
76- const NPCDesireCard : React . FC < NPCDesireCardProps > = ( { npcName, 档案, 后果, 里程碑数, npcId, onOpenBDSMRelationship, onOpenBDSMContract, onOpenBDSMSafety } ) => {
79+ const NPCDesireCard : React . FC < NPCDesireCardProps > = ( { npcName, 档案, 后果, 里程碑数, npcId, onOpenBDSMRelationship, onOpenBDSMContract, onOpenBDSMSafety, onGenerateTasks , onGenerateDailyInstructions , onCheckStageAdvance } ) => {
7780 const [ expanded , setExpanded ] = React . useState ( false ) ;
7881
7982 const 活跃后果 = useMemo ( ( ) => 后果 . filter ( c => ! c . 是否已解决 ) , [ 后果 ] ) ;
@@ -235,6 +238,35 @@ const NPCDesireCard: React.FC<NPCDesireCardProps> = ({ npcName, 档案, 后果,
235238 </ button >
236239 ) }
237240 </ div >
241+ < div className = "flex gap-2 mt-2" >
242+ { onGenerateTasks && (
243+ < button
244+ type = "button"
245+ onClick = { ( e ) => { e . stopPropagation ( ) ; onGenerateTasks ( npcId , npcName ) ; } }
246+ className = "flex-1 text-[11px] py-1.5 rounded bg-blue-900/20 border border-blue-500/30 text-blue-400 hover:bg-blue-900/40 transition-colors"
247+ >
248+ 生成任务
249+ </ button >
250+ ) }
251+ { onGenerateDailyInstructions && (
252+ < button
253+ type = "button"
254+ onClick = { ( e ) => { e . stopPropagation ( ) ; onGenerateDailyInstructions ( npcId , npcName ) ; } }
255+ className = "flex-1 text-[11px] py-1.5 rounded bg-cyan-900/20 border border-cyan-500/30 text-cyan-400 hover:bg-cyan-900/40 transition-colors"
256+ >
257+ 刷新指令
258+ </ button >
259+ ) }
260+ { onCheckStageAdvance && (
261+ < button
262+ type = "button"
263+ onClick = { ( e ) => { e . stopPropagation ( ) ; onCheckStageAdvance ( npcId , npcName ) ; } }
264+ className = "flex-1 text-[11px] py-1.5 rounded bg-amber-900/20 border border-amber-500/30 text-amber-400 hover:bg-amber-900/40 transition-colors"
265+ >
266+ 阶段判定
267+ </ button >
268+ ) }
269+ </ div >
238270 </ div >
239271 ) }
240272
@@ -280,6 +312,9 @@ interface Props {
280312 onOpenBDSMRelationship ?: ( npcId : string , npcName : string ) => void ;
281313 onOpenBDSMContract ?: ( npcId : string , npcName : string ) => void ;
282314 onOpenBDSMSafety ?: ( npcId : string , npcName : string ) => void ;
315+ onGenerateTasks ?: ( npcId : string , npcName : string ) => void ;
316+ onGenerateDailyInstructions ?: ( npcId : string , npcName : string ) => void ;
317+ onCheckStageAdvance ?: ( npcId : string , npcName : string ) => void ;
283318}
284319
285320export const CampusDesireDashboard : React . FC < Props > = ( {
@@ -291,6 +326,9 @@ export const CampusDesireDashboard: React.FC<Props> = ({
291326 onOpenBDSMRelationship,
292327 onOpenBDSMContract,
293328 onOpenBDSMSafety,
329+ onGenerateTasks,
330+ onGenerateDailyInstructions,
331+ onCheckStageAdvance,
294332} ) => {
295333 const npcIds = Object . keys ( NPC欲望档案 ) ;
296334
@@ -387,6 +425,9 @@ export const CampusDesireDashboard: React.FC<Props> = ({
387425 onOpenBDSMRelationship = { onOpenBDSMRelationship }
388426 onOpenBDSMContract = { onOpenBDSMContract }
389427 onOpenBDSMSafety = { onOpenBDSMSafety }
428+ onGenerateTasks = { onGenerateTasks }
429+ onGenerateDailyInstructions = { onGenerateDailyInstructions }
430+ onCheckStageAdvance = { onCheckStageAdvance }
390431 />
391432 ) ) }
392433 { npcIds . length === 0 && (
0 commit comments