MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / #updateTracking

Method #updateTracking

renderer/renderJS/main_ui_lib.js:84–123  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

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

Callers 1

updateFromDataMethod · 0.95

Calls 1

setMethod · 0.80

Tested by

no test coverage detected