@@ -119,7 +119,7 @@ export class OsuInstance {
119
119
120
120
this . entities . set ( 'process' , this . process ) ;
121
121
this . entities . set ( 'patterns' , new MemoryPatterns ( ) ) ;
122
- this . entities . set ( 'settings' , new Settings ( ) ) ;
122
+ this . entities . set ( 'settings' , new Settings ( this . entities ) ) ;
123
123
this . entities . set ( 'allTimesData' , new AllTimesData ( this . entities ) ) ;
124
124
this . entities . set ( 'beatmapPpData' , new BeatmapPPData ( this . entities ) ) ;
125
125
this . entities . set ( 'menuData' , new MenuData ( this . entities ) ) ;
@@ -263,32 +263,33 @@ export class OsuInstance {
263
263
while ( ! this . isDestroyed ) {
264
264
try {
265
265
allTimesData . updateState ( ) ;
266
+ settings . updateState ( ) ;
266
267
menuData . updateState ( ) ;
267
268
268
269
// osu! calculates audioTrack length a little bit after updating menuData, sooo.. lets this thing run regardless of menuData updating
269
270
if ( menuData . Folder !== '' && menuData . Folder !== null ) {
270
271
menuData . updateMP3Length ( ) ;
271
272
}
272
273
273
- if ( ! settings . gameFolder ) {
274
- settings . setGameFolder ( path . join ( this . path , '..' ) ) ;
274
+ if ( ! allTimesData . GameFolder ) {
275
+ allTimesData . setGameFolder ( path . join ( this . path , '..' ) ) ;
275
276
276
277
// condition when user have different BeatmapDirectory in osu! config
277
- if ( fs . existsSync ( allTimesData . SongsFolder ) ) {
278
- settings . setSongsFolder ( allTimesData . SongsFolder ) ;
278
+ if ( fs . existsSync ( allTimesData . MemorySongsFolder ) ) {
279
+ allTimesData . setSongsFolder (
280
+ allTimesData . MemorySongsFolder
281
+ ) ;
279
282
} else {
280
- settings . setSongsFolder (
283
+ allTimesData . setSongsFolder (
281
284
path . join (
282
285
this . path ,
283
286
'../' ,
284
- allTimesData . SongsFolder
287
+ allTimesData . MemorySongsFolder
285
288
)
286
289
) ;
287
290
}
288
291
}
289
292
290
- settings . setSkinFolder ( path . join ( allTimesData . SkinFolder ) ) ;
291
-
292
293
switch ( allTimesData . Status ) {
293
294
case 0 :
294
295
bassDensityData . updateState ( ) ;
@@ -405,7 +406,6 @@ export class OsuInstance {
405
406
const entities = this . entities . getServices ( [
406
407
'menuData' ,
407
408
'allTimesData' ,
408
- 'settings' ,
409
409
'gamePlayData' ,
410
410
'beatmapPpData'
411
411
] ) ;
@@ -416,17 +416,10 @@ export class OsuInstance {
416
416
updateMapMetadata ( entries : {
417
417
menuData : MenuData ;
418
418
allTimesData : AllTimesData ;
419
- settings : Settings ;
420
419
gamePlayData : GamePlayData ;
421
420
beatmapPpData : BeatmapPPData ;
422
421
} ) {
423
- const {
424
- menuData,
425
- allTimesData,
426
- settings,
427
- gamePlayData,
428
- beatmapPpData
429
- } = entries ;
422
+ const { menuData, allTimesData, gamePlayData, beatmapPpData } = entries ;
430
423
const currentMods =
431
424
allTimesData . Status === 2 || allTimesData . Status === 7
432
425
? gamePlayData . Mods
@@ -436,7 +429,7 @@ export class OsuInstance {
436
429
437
430
if (
438
431
menuData . Path ?. endsWith ( '.osu' ) &&
439
- settings . gameFolder &&
432
+ allTimesData . GameFolder &&
440
433
this . previousState !== currentState
441
434
) {
442
435
this . previousState = currentState ;
0 commit comments