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

Method #doCount

lib/modAssist_window_lib.js:1207–1216  ·  view source on GitHub ↗
(whichCount, amount, reset, inMB)

Source from the content-addressed store, hash-verified

1205 get isReady () { return this.#win.isVisible(this.#parent) }
1206
1207 #doCount (whichCount, amount, reset, inMB) {
1208 const thisCounter = `#${whichCount}`
1209 this[thisCounter] = ( reset ) ? amount : amount + this[thisCounter]
1210
1211 if ( whichCount === 'current' && this.#win.isVisible(this.#parent) ) {
1212 this.#win.win.main.setProgressBar(Math.max(0, Math.min(1, this.#current / this.#total)))
1213 }
1214
1215 this.#win.sendToValidWindow(this.#parent, `loading:${whichCount}`, this[thisCounter], inMB)
1216 }
1217
1218 /**
1219 * Hide the loading window

Callers 2

currentMethod · 0.95
totalMethod · 0.95

Calls 2

isVisibleMethod · 0.80
sendToValidWindowMethod · 0.80

Tested by

no test coverage detected