@@ -354,18 +354,18 @@ export const corruptionDisplay = (corr: keyof Corruptions | 'exit') => {
354
354
} satisfies Record < string , string >
355
355
356
356
if ( corr !== 'exit' ) {
357
- console . log ( player . corruptions . prototype . scoreMult ( corr ) )
357
+ console . log ( player . corruptions . next . scoreMult ( corr ) )
358
358
text = {
359
359
name : i18next . t ( `corruptions.names.${ corr } ` ) ,
360
360
description : i18next . t ( `corruptions.descriptions.${ corr } ` ) ,
361
361
current : i18next . t ( `corruptions.currentLevel.${ corr } ` , { level : player . corruptions . used . getLevel ( corr ) , effect : player . corruptions . used . corruptionEffects ( corr ) } ) ,
362
- planned : i18next . t ( `corruptions.prototypeLevel.${ corr } ` , { level : player . corruptions . prototype . getLevel ( corr ) , effect : player . corruptions . prototype . corruptionEffects ( corr ) } ) ,
363
- multiplier : i18next . t ( 'corruptions.scoreMultiplier' , { curr : player . corruptions . used . scoreMult ( corr ) , next : player . corruptions . prototype . scoreMult ( corr ) } ) ,
362
+ planned : i18next . t ( `corruptions.prototypeLevel.${ corr } ` , { level : player . corruptions . next . getLevel ( corr ) , effect : player . corruptions . next . corruptionEffects ( corr ) } ) ,
363
+ multiplier : i18next . t ( 'corruptions.scoreMultiplier' , { curr : player . corruptions . used . scoreMult ( corr ) , next : player . corruptions . next . scoreMult ( corr ) } ) ,
364
364
spiritContribution : i18next . t ( 'corruptions.spiritEffect' , { curr : 1 , next : 1 } ) ,
365
365
image : `Pictures/${ IconSets [ player . iconSet ] [ 0 ] } ${ corrIcons [ corr ] } `
366
366
}
367
367
DOMCacheGetOrSet ( `corrCurrent${ corr } ` ) . textContent = format ( player . corruptions . used . getLevel ( corr ) )
368
- DOMCacheGetOrSet ( `corrNext${ corr } ` ) . textContent = format ( player . corruptions . prototype . getLevel ( corr ) )
368
+ DOMCacheGetOrSet ( `corrNext${ corr } ` ) . textContent = format ( player . corruptions . next . getLevel ( corr ) )
369
369
}
370
370
371
371
DOMCacheGetOrSet ( 'corruptionName' ) . textContent = text . name
@@ -385,7 +385,7 @@ export const corruptionStatsUpdate = () => {
385
385
const a = DOMCacheGetOrSet ( `corrCurrent${ corrKey } ` )
386
386
const b = DOMCacheGetOrSet ( `corrNext${ corrKey } ` )
387
387
a . textContent = format ( player . corruptions . used . getLevel ( corrKey ) )
388
- b . textContent = format ( player . corruptions . prototype . getLevel ( corrKey ) )
388
+ b . textContent = format ( player . corruptions . next . getLevel ( corrKey ) )
389
389
}
390
390
391
391
}
@@ -417,7 +417,7 @@ export const corruptionButtonsAdd = () => {
417
417
418
418
span = document . createElement ( 'span' )
419
419
span . id = `corrNext${ key } `
420
- span . textContent = `${ player . corruptions . prototype . getLevel ( key ) } `
420
+ span . textContent = `${ player . corruptions . next . getLevel ( key ) } `
421
421
p . appendChild ( span )
422
422
row . appendChild ( p )
423
423
@@ -452,7 +452,7 @@ export const corruptionButtonsAdd = () => {
452
452
export const corruptionLoadoutTableCreate = ( ) => {
453
453
const table = getElementById < HTMLTableElement > ( 'corruptionLoadoutTable' )
454
454
455
- const corrNext = player . corruptions . prototype . getLoadout ( )
455
+ const corrNext = player . corruptions . next . getLoadout ( )
456
456
const corrSaves = player . corruptions . saves . getSaves ( )
457
457
458
458
// Delete rows that already exist
@@ -493,7 +493,7 @@ export const corruptionLoadoutTableCreate = () => {
493
493
const zeroBtn = document . createElement ( 'button' )
494
494
zeroBtn . className = 'corrLoad'
495
495
zeroBtn . textContent = i18next . t ( 'corruptions.loadoutTable.zero' )
496
- zeroBtn . addEventListener ( 'click' , ( ) => player . corruptions . prototype . resetCorruptions ( ) )
496
+ zeroBtn . addEventListener ( 'click' , ( ) => player . corruptions . next . resetCorruptions ( ) )
497
497
zeroCell . appendChild ( zeroBtn )
498
498
zeroCell . title = i18next . t ( 'corruptions.loadoutTable.zeroTitle' )
499
499
@@ -531,10 +531,10 @@ export const corruptionLoadoutTableCreate = () => {
531
531
}
532
532
}
533
533
534
- export const corruptionLoadoutTableUpdate = ( updatePrototype = false , updateRow = 0 ) => {
534
+ export const corruptionLoadoutTableUpdate = ( updateNext = false , updateRow = 0 ) => {
535
535
const row = getElementById < HTMLTableElement > ( 'corruptionLoadoutTable' ) . rows [ updateRow + 1 ] . cells
536
- if ( updatePrototype ) {
537
- const corrNext = player . corruptions . prototype . getLoadout ( )
536
+ if ( updateNext ) {
537
+ const corrNext = player . corruptions . next . getLoadout ( )
538
538
let index = 0
539
539
for ( const corr in corrNext ) {
540
540
const corrKey = corr as keyof Corruptions
@@ -554,14 +554,14 @@ export const corruptionLoadoutTableUpdate = (updatePrototype = false, updateRow
554
554
}
555
555
556
556
export const corruptionSaveLoadout = ( loadoutNum : number ) => {
557
- const buildToSave = player . corruptions . prototype . getLoadout ( )
557
+ const buildToSave = player . corruptions . next . getLoadout ( )
558
558
player . corruptions . saves . getSaves ( ) [ loadoutNum ] . loadout . setCorruptionLevels ( buildToSave )
559
559
corruptionLoadoutTableUpdate ( false , loadoutNum + 1 )
560
560
}
561
561
562
562
export const corruptionLoadLoadout = ( loadoutNum : number ) => {
563
563
const buildToLoad = player . corruptions . saves . getSaves ( ) [ loadoutNum ] . loadout . getLoadout ( )
564
- player . corruptions . prototype . setCorruptionLevels ( buildToLoad )
564
+ player . corruptions . next . setCorruptionLevels ( buildToLoad )
565
565
corruptionLoadoutTableUpdate ( true )
566
566
corruptionStatsUpdate ( )
567
567
}
@@ -582,7 +582,7 @@ export const applyCorruptions = (corruptions: string) => {
582
582
}
583
583
584
584
if ( corr ) {
585
- player . corruptions . prototype . setCorruptionLevels ( corr )
585
+ player . corruptions . next . setCorruptionLevels ( corr )
586
586
corruptionLoadoutTableUpdate ( true , 0 )
587
587
corruptionStatsUpdate ( )
588
588
return true
@@ -635,7 +635,7 @@ export const updateCorruptionLoadoutNames = () => {
635
635
}
636
636
637
637
const corruptionLoadoutGetExport = async ( ) => {
638
- const str = JSON . stringify ( player . corruptions . prototype . getLoadout ( ) )
638
+ const str = JSON . stringify ( player . corruptions . next . getLoadout ( ) )
639
639
if ( 'clipboard' in navigator ) {
640
640
await navigator . clipboard . writeText ( str )
641
641
. catch ( ( e : Error ) => Alert ( i18next . t ( 'corruptions.loadoutExport.saveErrorNavigator' , { message : e . message } ) ) )
0 commit comments