방 설정 "컴퓨터 채팅": 컴퓨터가 혼자 말하는 건 방장이 켤 때만(기본 끄기), 마피아는 항상 켜짐
- RoomConfig/RoomView.botChat, config 메시지에 botChat. 새 방·옛 방 모두 끄기. - BotBrain: 꺼져 있으면 도발·반응·대답·시작 인사·끝 인사 안 함, 모델 미리 올리기도 안 함. 바퀴벌레 포커 진짜/블러핑 판단은 그대로, 한마디만 뺌. - BOT_CHAT_REQUIRED(마피아): 설정과 상관없이 항상 켜짐, 설정 칸에 "항상 켜짐" 표시. - 대기실 설정에 컴퓨터 채팅 켜기/끄기(컴퓨터 상대가 있는 게임만). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** 방: 대기실 ↔ 게임 ↔ 결과를 한 주소에서 전환 (docs/06 §5–§9). */
|
||||
import { useEffect, useLayoutEffect, useMemo, useRef, useState, type ReactNode } from 'react';
|
||||
import { Link, useNavigate, useParams } from 'react-router';
|
||||
import { BOT_BANDS, BOT_PICKS, BOT_PICK_LABEL, bandOf, botsAllowed, formatRoomCode, isBotId, luckLabel, type PublicUser, type RoomView } from '@bg/shared/lite';
|
||||
import { BOT_BANDS, BOT_PICKS, BOT_PICK_LABEL, bandOf, botChatRequired, botsAllowed, formatRoomCode, isBotId, luckLabel, type PublicUser, type RoomView } from '@bg/shared/lite';
|
||||
import { Avatar, CodeLabel, ConfirmSheet, CopyButton, ShareButton, Sheet, TopBar } from '../components/ui';
|
||||
import { GuestWarning, NicknameForm } from '../components/NicknameForm';
|
||||
import { GameNotice, gameName } from '../components/GameNotice';
|
||||
@@ -581,6 +581,21 @@ function SettingsForm({ room, ui, inline, readOnly, onDone }: { room: RoomView;
|
||||
<strong>채팅</strong>
|
||||
{readOnly ? <ReadOnlyControls>{seg(room.chatEnabled, () => {}, '켜기', '끄기')}</ReadOnlyControls> : seg(room.chatEnabled, (chatEnabled) => socket.send({ t: 'config', chatEnabled }), '켜기', '끄기')}
|
||||
</div>
|
||||
{botsAllowed(room.gameId) && (
|
||||
<div className="stack" style={{ gap: 6 }}>
|
||||
<strong>컴퓨터 채팅</strong>
|
||||
{botChatRequired(room.gameId) ? (
|
||||
<p className="muted small" style={{ margin: 0 }}>
|
||||
항상 켜짐 · 이 게임은 컴퓨터도 말해야 할 수 있어요
|
||||
</p>
|
||||
) : readOnly ? (
|
||||
<ReadOnlyControls>{seg(room.botChat, () => {}, '켜기', '끄기')}</ReadOnlyControls>
|
||||
) : (
|
||||
seg(room.botChat, (botChat) => socket.send({ t: 'config', botChat }), '켜기', '끄기')
|
||||
)}
|
||||
{!botChatRequired(room.gameId) && <span className="muted small">켜면 컴퓨터가 게임하면서 먼저 말을 걸고, 채팅에 대답해요.</span>}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{!inline && (
|
||||
<button className="btn btn-primary btn-block" onClick={onDone}>
|
||||
|
||||
Reference in New Issue
Block a user