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A;IA3SU,0BAAI,GAAG,uBAAuB,CAAC;IAD7B,qBAAqB;QADjC,qCAAY,CAAC,+BAAgB,CAAC;OAClB,qBAAqB,CA4SjC;IAAD,4BAAC;KAAA;AA5SY,sDAAqB","file":"","sourceRoot":"/","sourcesContent":["import { CompositeDisposable } from \"simba-eventkit\";\nimport { DeepReadonly, delay } from \"simba-utils\";\nimport { ActionManager } from \"../../../avg/ActionManager\";\nimport { RoleType } from \"../../../avg/EditorEnums\";\nimport { GameRecord } from \"../../../avg/game-data/GameRecord\";\nimport { getPlot } from \"../../../avg/game-data/PlotsData\";\nimport { ReadonlyPlot, ReadonlyPlots, SentenceSelectContent, SentenceType } from \"../../../avg/model/PlotModel\";\nimport { PlotManager } from \"../../../avg/PlotManager\";\nimport { Presenter } from \"../../../common/classbase/PresenterBase\";\nimport { UIManager } from \"../../../common/gameplay/managers/UIManager\";\nimport { PlotSceneType } from \"../../Enums\";\nimport { GameModelManager } from \"../../model/GameModelManager\";\nimport { MessageSceneModel } from \"../../model/MessageSceneModel\";\nimport { RegPresenter } from \"../PresenterCCViewFactory\";\nimport { ChatListAutoNextPlot, ChatListItemProps, ChatListView, ChatListViewProps, ChatListViewType } from \"../view/type/ChatListView\";\nimport { SentenceSelectorViewProps } from \"../view/type/SentenceSelectorView\";\nimport SentenceSelectorViewPresenter from \"./SentenceSelectorViewPresenter\";\n\nconst MAX_HISTORY = 50;\n@RegPresenter(ChatListViewType)\nexport class ChatListViewPresenter extends Presenter<MessageSceneModel, ChatListView> {\n static uuid = \"ChatListViewPresenter\";\n private _chatList: ChatListItemProps[];\n private _sceneModel: MessageSceneModel;\n get sceneModel() { return this._sceneModel; }\n private _historyMessages: { [id: number]: ChatListItemProps[] } = {};\n private _currPlot?: ReadonlyPlot;\n private _currPlotShowed = false;\n private _itemKey = 0;\n private _plotExecuting = false;\n private _excutedPlots: { [key: number]: boolean } = {};\n private _selectIndex?: number;\n private _plotChangeLike?: number;\n\n private _viewProps: ChatListViewProps;\n\n constructor() {\n super();\n PlotManager.PlotsRollbackEvent.on(() => {\n this._excutedPlots = {};\n })\n }\n\n getRoleId() {\n if (this.sceneModel.config.roles.length == 1)\n return this.sceneModel.config.roles[0];\n return 1;\n }\n\n onSelectIndexCallback = (index: number) => {\n this.selectSentence(index);\n }\n\n onSetContent = (content: DeepReadonly<SentenceSelectContent>) => {\n if (content != undefined) {\n let props: SentenceSelectorViewProps =\n {\n sentence: content,\n backgroundpath: \"textures/message/selector_bg\",\n clickcausehide: false,\n onSelectIndexCallback: this.onSelectIndexCallback\n };\n UIManager.pushPresenter(SentenceSelectorViewPresenter, props);\n }\n }\n\n isSentenceSelectVisible = (): boolean => {\n let preset = UIManager.getTopPresenter();\n if (preset instanceof SentenceSelectorViewPresenter) {\n let selectorPresenter = preset as SentenceSelectorViewPresenter;\n return !selectorPresenter.view.isHidden;\n }\n return false;\n }\n\n async onOpen(scene: MessageSceneModel) {\n this._sceneModel = scene;\n super.onOpen(scene);\n this._disposable.add(PlotManager.PlotStartEvent.on(this.handlePlotsStart));\n this._currPlot = PlotManager.getCurrentPlots().find(v => v.plotSceneType === PlotSceneType.Message && v.plotSceneTypeId === scene.id);\n //@ts-ignore\n delete this._chatList;\n if (this._historyMessages[scene.id]) {\n this._chatList = this._historyMessages[scene.id];\n }\n\n if (this._chatList && this._chatList.length) {\n if (this._chatList[this._chatList.length - 1].type === \"end\") { // 上一次的结束改为历史\n let item = this._chatList.pop();\n this._chatList.push({ key: item!.key, type: \"history\" });\n\n for (let i = this._chatList.length - 2; i >= 0; i--) { // 删除之前的历史分割,只保留最后一个\n let item = this._chatList[i];\n if (item.type === \"history\") {\n this._chatList.splice(i, 1);\n break;\n }\n }\n }\n this._viewProps = {\n msgSceneId: scene.id, title: GameModelManager.getConfigLanguageTxt(scene.config.title),\n items: this._chatList, historyMsgCount: this._chatList.length,\n onCloseBtnClick: this.closeAction,\n onSelectChapter: this.selectChapter,\n onCompletePlot: this.completePlot,\n onSelectSentence: this.selectSentence,\n onSetContent: this.onSetContent,\n isSentenceSelectVisible: this.isSentenceSelectVisible,\n backRedDot: !this._currPlot\n };\n this._view.setProps(this._viewProps);\n } else {\n this._viewProps = {\n msgSceneId: scene.id, title: GameModelManager.getConfigLanguageTxt(scene.config.title), \n items: [], historyMsgCount: 0,\n onCloseBtnClick: this.closeAction,\n onSelectChapter: this.selectChapter,\n onCompletePlot: this.completePlot,\n onSelectSentence: this.selectSentence,\n onSetContent: this.onSetContent,\n isSentenceSelectVisible: this.isSentenceSelectVisible,\n backRedDot: !this._currPlot\n };\n this._view.setProps(this._viewProps);\n await this.loadChatList();\n }\n\n if (this._currPlot) {\n this._currPlotShowed = false;\n await this.showCurrPlot();\n if (this._plotChangeLike) {\n let item = { ...this._chatList.pop()! };\n if (item.type === \"plot\") { // 理论上肯定成立\n item.addLike = this._plotChangeLike;\n }\n this._chatList.push(item);\n this.view.updateProps({ items: this._chatList });\n }\n }\n }\n\n closeAction = () => {\n if (this._plotExecuting) return;\n UIManager.popToPresenter(this);\n this._view.closeAnimation().then(() => {\n this._view.close();\n });\n }\n\n selectChapter = () => {\n\n }\n\n selectSentence = (index: number) => {\n if (!this._currPlot) throw new Error(\"ChatList: ePlot error! No currnt plot!\");\n this.completePlot(index, ChatListAutoNextPlot);\n }\n\n showCurrPlot = async () => {\n if (this._currPlot && !this._excutedPlots[this._currPlot.id] && !this._plotExecuting && !this._currPlotShowed) {\n let item = this.convertPlotToViewModel(this._currPlot);\n this._excutedPlots[this._currPlot.id] = true;\n this._plotExecuting = true;\n let disposable = new CompositeDisposable;\n this._plotChangeLike = undefined;\n GameRecord.onRecordVariableChange(\"like\" + this._currPlot!.sentences[0].roleId, (scope, varName, preValue, value) => {\n this._plotChangeLike = (value as number) - (preValue as number);\n });\n await ActionManager.executeActions(this._currPlot!.sentences[0].actions); // TODO 处理加好感\n disposable.dispose();\n this._plotExecuting = false;\n if (item) {\n if (this._chatList.length >= MAX_HISTORY) {\n this._chatList.shift();\n }\n this._chatList.push(item);\n if (item.type === \"plot\" && this._plotChangeLike) {\n item.addLike = this._plotChangeLike;\n }\n this._view.updateProps({ items: this._chatList });\n }\n this._currPlotShowed = true;\n } else if (this._currPlot && this._excutedPlots[this._currPlot.id]) {\n this._currPlotShowed = true;\n }\n }\n\n completePlot = async (index?: number, proceedNext = true) => {\n if (!this._currPlot) return;\n if (!this._currPlotShowed) { this.showCurrPlot(); return; }\n if (index !== undefined) { // 刷新界面剧情选择\n let lastItem = this._chatList.pop()!;\n if (lastItem.type === \"plot\") {\n this._chatList.push({ ...lastItem, select: index });\n } else {\n throw new Error(\"ChatList: Plot error!\");\n }\n this._view.updateProps({ items: this._chatList });\n }\n // await this.execCurrPlot(); // 改为开始的时候执行\n if (proceedNext) {\n this.sceneModel.lastPlot = this._currPlot;\n if (this._selectIndex !== undefined) {\n index = this._selectIndex;\n this._selectIndex = undefined;\n }\n if (ChatListAutoNextPlot) await delay(0.5);\n await this.nextPlot(index);\n } else {\n this._selectIndex = index;\n }\n }\n\n private nextPlot = async (index?: number) => {\n if (this.isClosed()) return;\n if (this._currPlot) {\n await PlotManager.completePlot(this._currPlot!, index, this._plotChangeLike ? { addlike: this._plotChangeLike } : undefined);\n } else {\n console.error(\"ChatList: Plot error! No current plot!\");\n }\n }\n\n private async loadChatList() {\n // if (chapter === -1) {\n // chapter = GameModelManager.getCurrentChapterId();\n // }\n\n if (this._historyMessages[this._sceneModel.id] && this._historyMessages[this._sceneModel.id]) {\n this._view.updateProps({ items: this._chatList });\n return;\n }\n this._historyMessages[this._sceneModel.id] = [];\n\n let historyPlots: ChatListItemProps[] = [];\n let records = GameRecord.getCurrentRecordItems();\n let pushHistory = false;\n let hasHistory = false;\n let lastPlotId: number = Number.MAX_SAFE_INTEGER;\n for (let i = records.length - 1; i >= 0; i--) {\n let item = records[i];\n for (let j = 0; j < item.p.length; j++) {\n let plotId = item.p[j];\n if (plotId === lastPlotId) break;\n let plot = (await getPlot(plotId))! as ReadonlyPlot;\n if (!plot) continue;\n if (plot.plotSceneType === PlotSceneType.Message && plot.plotSceneTypeId === this._sceneModel.id) {\n lastPlotId = plotId;\n if (i === records.length - 1) continue;\n if (pushHistory && !hasHistory) {\n historyPlots.unshift({ key: (this._itemKey++).toString(), type: \"history\" });\n hasHistory = true;\n }\n let select: number | undefined = undefined;\n if (item.s) select = item.s[j];\n let customData: object | undefined = undefined;\n if (item.c) customData = item.c[j];\n let vm = this.convertPlotToViewModel(plot, select, customData);\n if (vm) historyPlots.unshift(vm);\n } else { // TODO process branch plots if needed.\n if (!pushHistory && !hasHistory) {\n pushHistory = true;\n }\n }\n if (plot.id === this._sceneModel.firstPlot.id) {\n break;\n }\n }\n if (historyPlots.length >= MAX_HISTORY) {\n break;\n }\n }\n this._chatList = historyPlots;\n this._view.updateProps({ items: historyPlots, historyMsgCount: this._chatList.length });\n this._historyMessages[this._sceneModel.id] = this._chatList;\n }\n\n private convertPlotToViewModel = (plot: ReadonlyPlot, select?: number, customData?: object): ChatListItemProps | undefined => {\n let role = GameModelManager.getRoleData(plot.sentences[0].roleId)!;\n let content = plot.sentences[0].content;\n if (plot.id >= 0) {\n if (!content) return undefined;\n return { key: (this._itemKey++).toString(), type: \"plot\", name: role.getConfig().RoleType === RoleType.Role_Blank ? \"\" : role.getConfig().name, icon: role.getHeadIcon(true), isSelf: role.getConfig().RoleType === RoleType.Role_Player, content, select, addLike: customData ? customData[\"addlike\"] : undefined };\n } else { \n // // custom plot\n // let giftId = plot.customData?.giftId;\n // if (giftId) {// 送礼\n // let giftItem = ConfigManager.getConfig(itemConfig, giftId);\n // return { key: (this._itemKey++).toString(), type: \"customplot\", name: role.getConfig().name, icon: role.getHeadIcon(true), isSelf: true, gift: { icon: GameResData.GAME_ICON_BASE_PATH + giftItem.icon, text: \"送你一个\" + giftItem.name } };\n // } else {\n // if (content && content.type !== SentenceType.SELECT) {\n // let addLike = plot.customData?.addLike;\n // return { key: (this._itemKey++).toString(), type: \"customplot\", name: role.getConfig().name, icon: role.getHeadIcon(true), isSelf: false, content, addLike }\n // } else {\n // throw new Error(\"This cannot happen!\");\n // }\n // }\n }\n }\n\n private handlePlotsStart = async (plots: ReadonlyPlots) => {\n let plot = plots.find(v => v.plotSceneType === PlotSceneType.Message && v.plotSceneTypeId === this._sceneModel.id);\n if (plot) {\n if (this._currPlot && plot === this._currPlot) return; // 有分支剧情的情况\n this._currPlot = plot;\n this._currPlotShowed = false;\n\n await this.showCurrPlot();\n } else if (this._currPlot && this._currPlot.id >= 0) {\n this._currPlot = undefined;\n this._chatList.push({ key: (this._itemKey++).toString(), type: \"end\" });\n if (this._chatList.length >= MAX_HISTORY) {\n this._chatList.shift();\n }\n this._view.updateProps({ items: this._chatList, backRedDot: true });\n }\n }\n\n private isClosed() {\n return !this._disposable;\n }\n}"]}