import type { NPCConfiguration, NPCInteraction } from '../types/npc'; interface NPCInteractionEditorProps { config: NPCConfiguration; onChange: (config: NPCConfiguration) => void; } export function NPCInteractionEditor({ config, onChange }: NPCInteractionEditorProps) { const handleInteractionChange = (interaction: NPCInteraction) => { onChange({ ...config, interaction }); }; const handleTypeChange = (type: NPCInteraction['type']) => { switch (type) { case 'dialogue': handleInteractionChange({ type: 'dialogue', dialogue: '' }); break; case 'script': handleInteractionChange({ type: 'script', script: '' }); break; case 'custom_script': handleInteractionChange({ type: 'custom_script', script: '' }); break; case 'none': handleInteractionChange({ type: 'none' }); break; } }; return (
Reference to a dialogue file (e.g., "cobblemon:my_dialogue" refers to data/cobblemon/dialogues/my_dialogue.json)
Reference to a MoLang script file (e.g., "cobblemon:my_script" refers to data/cobblemon/molang/my_script.molang)
This NPC will not respond to player interactions. Useful for decorative NPCs.