日志控制
This commit is contained in:
@@ -2,6 +2,7 @@ import { ChatContentsLayout } from "../ui/components/ChatContentsLayout";
|
||||
import { DiaLogData, Dialog } from "../data/DialogData";
|
||||
import Utils from "db://assets/Scripts/Main/Common/Utils";
|
||||
import { InnerMsgCode } from "db://assets/Scripts/Main/Config/InnerMsgCode";
|
||||
import { logger } from "db://assets/Scripts/Main/Common/Logger";
|
||||
|
||||
/**
|
||||
* 对话管理器
|
||||
@@ -75,7 +76,7 @@ export class DialogManager {
|
||||
// 如果是玩家消息,直接添加单个气泡
|
||||
if (isPlayer) {
|
||||
this.dialogData.pushDialog(isPlayer, str);
|
||||
console.log("Dialog updated:", {
|
||||
logger.log("Dialog updated:", {
|
||||
isPlayer,
|
||||
content: str.substring(0, 50) + "...",
|
||||
});
|
||||
@@ -134,7 +135,7 @@ export class DialogManager {
|
||||
*/
|
||||
public addLoadingDialog(): void {
|
||||
this.dialogData.pushDialog(false, "...", true);
|
||||
console.log("Loading dialog added");
|
||||
logger.log("Loading dialog added");
|
||||
Utils.sendInnerMsg(InnerMsgCode.Chat_DialogRefresh);
|
||||
}
|
||||
|
||||
@@ -153,7 +154,7 @@ export class DialogManager {
|
||||
*/
|
||||
public clearDialogs(): void {
|
||||
this.dialogData.cleanDialog();
|
||||
console.log("All dialogs cleared");
|
||||
logger.log("All dialogs cleared");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,7 +169,7 @@ export class DialogManager {
|
||||
dialog.content,
|
||||
);
|
||||
});
|
||||
console.log(`DialogManager: Set ${dialogs.length} dialogs`);
|
||||
logger.log(`DialogManager: Set ${dialogs.length} dialogs`);
|
||||
Utils.sendInnerMsg(InnerMsgCode.Chat_DialogRefresh);
|
||||
}
|
||||
|
||||
@@ -178,7 +179,7 @@ export class DialogManager {
|
||||
*/
|
||||
public syncFromChatModel(dialogs: Dialog[]): void {
|
||||
this.setDialogs(dialogs);
|
||||
console.log("DialogManager: Synced dialogs from ChatModel");
|
||||
logger.log("DialogManager: Synced dialogs from ChatModel");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user