This commit is contained in:
2025-12-07 18:24:18 +00:00
parent df9afa3f4a
commit b1fd0ec5ff
2 changed files with 38 additions and 11 deletions
+11 -5
View File
@@ -27,6 +27,7 @@ const commands: Record<string, string> = {
'/chat': '/ai',
'/achievements': '/achievements',
'/ach': '/achievements',
'/a': '/achievements',
};
const helpText = `Available commands:
@@ -43,10 +44,15 @@ const helpText = `Available commands:
/breakout - Play Breakout
/music, /m - Navigate to Music Player
/ai, /chat - Navigate to AI Chat
/achievements - View achievements
/help, /h - Show this help message
/clear, /c - Clear terminal output
/clear, /c - Clear terminal output`;
...there may be other commands.`;
const helpHint = `
╔══════════════════════════════════════════╗
║ ...there may be other commands. ║
║ Perhaps a HINT to an easter egg exists? ║
╚══════════════════════════════════════════╝`;
const TerminalCommand = () => {
const [isOpen, setIsOpen] = useState(false);
@@ -114,7 +120,7 @@ const TerminalCommand = () => {
unlockAchievement('terminal_user');
if (trimmedInput === '/help' || trimmedInput === '/h') {
setOutput(prev => [...prev, helpText]);
setOutput(prev => [...prev, helpText, '---HINT---' + helpHint]);
} else if (trimmedInput === '/hint') {
unlockAchievement('hint_seeker');
setOutput(prev => [...prev,
@@ -186,8 +192,8 @@ const TerminalCommand = () => {
className="h-48 overflow-y-auto p-4 font-mono text-sm text-primary/90"
>
{output.map((line, i) => (
<div key={i} className="whitespace-pre-wrap mb-1">
{line}
<div key={i} className={`whitespace-pre-wrap mb-1 ${line.startsWith('---HINT---') ? 'text-yellow-400 animate-pulse' : ''}`}>
{line.startsWith('---HINT---') ? line.replace('---HINT---', '') : line}
</div>
))}
</div>