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,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;IACjE,CAAC;IAGD,IAAI,UAAU,KAAK,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,IAAI,UAAU,CAAC,EAAU;QACrB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,uBAAU,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;IAC7D,CAAC;IAUD,KAAK,CAAC,eAAe;QACjB,IAAI,CAAC,OAAO,GAAG,uBAAU,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAW,IAAI,iBAAiB,CAAC,MAAM,CAAC;QACxG,IAAI,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,sBAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,uBAAU,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAW,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;QAC3J,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,mBAAO,CAAC,WAAW,CAAC,CAAE,CAAC;QAChD,IAAI,CAAC,GAAG,GAAG,uBAAU,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAW,IAAI,EAAE,CAAC;IACnF,CAAC;CACJ;AA1CD,sDA0CC","file":"","sourceRoot":"/","sourcesContent":["import { ConfigManager } from \"../../common/gameplay/managers/ConfigManager\";\nimport { dateSceneConfig } from \"../../config/DateSceneConfig\";\nimport { GameRecord } from \"../../avg/game-data/GameRecord\";\nimport { ReadonlyPlot } from \"../../avg/model/PlotModel\";\nimport { getPlot } from \"../../avg/game-data/PlotsData\";\nimport { DateType } from \"../../avg/EditorEnums\";\n\nexport enum DatingEventStatus {\n Locked = 1,\n New,\n InProgress,\n Completed\n}\n\nexport class DatingEventSceneModel {\n private _id: number;\n get id() { return this._id }\n get config() { return ConfigManager.getConfig(dateSceneConfig, this._id); }\n\n private _status: DatingEventStatus;\n get status() { return this._status; }\n set status(v: DatingEventStatus) {\n if (this._status !== v) {\n this._status = v;\n GameRecord.recordVariables[this._recordKey + \".s\"] = v;\n }\n }\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 _bg: string;\n get background() { return this._bg; }\n set background(bg: string) {\n this._bg = bg;\n GameRecord.recordVariables[this._recordKey + \".bg\"] = bg;\n }\n\n private _recordKey: string;\n\n constructor(id: number) {\n this._id = id;\n this._recordKey = \"de\" + this._id;\n this._bg = \"\";\n }\n\n async initFromRecords() {\n this._status = GameRecord.recordVariables[this._recordKey + \".s\"] as number || DatingEventStatus.Locked;\n let firstPlotId = this.config.DateType === DateType.Date_Normal ? GameRecord.recordVariables[this._recordKey + \".f\"] as number : this.config.start_plot_id;\n this._firstPlot = (await getPlot(firstPlotId))!;\n this._bg = GameRecord.recordVariables[this._recordKey + \".bg\"] as string || \"\";\n }\n}"]}