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,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAW,CAAC;QAC9E,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,aAAO,CAAC,WAAW,CAAC,CAAE,CAAC;QAChD,IAAI,UAAU,KAAK,SAAS,EAAE;YAC1B,IAAI,CAAC,SAAS,GAAG,MAAM,aAAO,CAAC,UAAU,CAAC,CAAC;SAC9C;IACL,CAAC;CACJ;AAtCD,8CAsCC","file":"","sourceRoot":"/","sourcesContent":["import { ReadonlyPlot, GameRecord, getPlot } from \"../../avg/AVG\";\nimport { ConfigManager } from \"simba-config-manager\";\nimport { messageSceneConfig } from \"../../config/MessageSceneConfig\";\n\nexport class MessageSceneModel {\n private _id: number;\n get id() { return this._id }\n\n get config() { return ConfigManager.getConfig(messageSceneConfig, this._id); }\n\n private _firstPlot: ReadonlyPlot;\n get firstPlot() { return this._firstPlot; }\n set firstPlot(plot: ReadonlyPlot) {\n this._firstPlot = plot;\n GameRecord.recordVariables[this._recordKey + \".f\"] = plot.id;\n }\n\n private _lastPlot?: ReadonlyPlot;\n get lastPlot() { return this._lastPlot; }\n set lastPlot(plot: ReadonlyPlot | undefined) {\n if (this._lastPlot === plot) return;\n this._lastPlot = plot;\n if (plot) {\n GameRecord.recordVariables[this._recordKey + \".l\"] = plot.id;\n }\n }\n\n private _recordKey: string;\n\n constructor(id: number) {\n this._id = id;\n this._recordKey = \"m\" + this._id;\n }\n\n async initFromRecords() {\n let firstPlotId = GameRecord.recordVariables[this._recordKey + \".f\"] as number;\n let lastPlotId = GameRecord.recordVariables[this._recordKey + \".l\"] as number;\n this._firstPlot = (await getPlot(firstPlotId))!;\n if (lastPlotId !== undefined) {\n this._lastPlot = await getPlot(lastPlotId);\n }\n }\n}"]}