| 82 | } |
| 83 | |
| 84 | #updateTracking(data) { |
| 85 | const lastColSet = this.track.lastPayload?.set_Collections || null |
| 86 | |
| 87 | if ( lastColSet !== null ) { |
| 88 | const newFolderSet = data.set_Collections.difference(lastColSet) |
| 89 | if ( newFolderSet.size === 1 ) { |
| 90 | this.track.newFolder = [...newFolderSet][0] |
| 91 | } else { |
| 92 | this.track.newFolder = null |
| 93 | } |
| 94 | } else { |
| 95 | this.track.newFolder = null |
| 96 | } |
| 97 | |
| 98 | this.track.lastPayload = data |
| 99 | this.flag.activeCollect = data.opts.activeCollection |
| 100 | this.flag.currentLocale = data.opts.currentLocale |
| 101 | this.flag.currentVersion = data.appSettings.game_version |
| 102 | this.flag.debugMode = data.opts.isDev |
| 103 | this.flag.folderDirty = data.opts.foldersDirty |
| 104 | this.flag.folderEdit = data.opts.foldersEdit |
| 105 | this.flag.gameRunning = data.opts.gameRunning |
| 106 | this.flag.launchEnable = data.opts.gameRunningEnable |
| 107 | this.flag.miniMode = data.opts.showMini |
| 108 | this.flag.updateReady = data.updateReady |
| 109 | this.flag.versionTool = false |
| 110 | |
| 111 | this.extSites = data.opts.modSites |
| 112 | this.malwareSkip = data.dangerModsSkip |
| 113 | this.malwareSuppress = data.appSettings.suppress_malware |
| 114 | |
| 115 | this.searchTagList = new Set() |
| 116 | this.collections = {} |
| 117 | this.mods = {} |
| 118 | this.orderMap = { keys : [], keyToNum : {}, max : 0, numToKey : {} } |
| 119 | |
| 120 | this.mapCollectionFiles = new Map() |
| 121 | this.mapCollectionDropdown = new Map() |
| 122 | this.mapCollectionDropdown.set(0, `--${data.opts.l10n.disable}--`) |
| 123 | } |
| 124 | doL10N(item, lowerCase = false) { |
| 125 | let returnText = item?.[this.track.currentLocale] |
| 126 | returnText ??= item?.en |