@@ -76,7 +76,7 @@ export default function GameUI({ inCoolMathGames, miniMapShown, setMiniMapShown,
76
76
round : prev . round + 1
77
77
}
78
78
} )
79
- } else {
79
+ } else if ( setSinglePlayerRound ) {
80
80
// reset to default
81
81
setSinglePlayerRound ( {
82
82
round : 1 ,
@@ -96,7 +96,7 @@ export default function GameUI({ inCoolMathGames, miniMapShown, setMiniMapShown,
96
96
const loadTime = window . gameOpen ;
97
97
const lastDiscordShown = gameStorage . getItem ( "shownDiscordModal" ) ;
98
98
if ( lastDiscordShown ) return console . log ( "Discord modal already shown" ) ;
99
- if ( Date . now ( ) - loadTime > 600000 ) {
99
+ if ( Date . now ( ) - loadTime > 600000 && ! process . env . NEXT_PUBLIC_COOLMATH ) {
100
100
setShowDiscordModal ( true )
101
101
sendEvent ( 'discord_modal_shown' )
102
102
} else console . log ( "Not showing discord modal, waiting for " + ( 600000 - ( Date . now ( ) - loadTime ) ) + "ms" )
@@ -454,14 +454,14 @@ export default function GameUI({ inCoolMathGames, miniMapShown, setMiniMapShown,
454
454
return (
455
455
< div className = "gameUI" >
456
456
457
- { ! onboarding && ! inCrazyGames && ! inCoolMathGames && ( ! session ?. token ?. supporter ) && (
457
+ { ! onboarding && ! inCrazyGames && ! inCoolMathGames && ( ! session ?. token ?. supporter ) && ( width > 700 ) && (
458
458
< div className = { `topAdFixed ${ ( multiplayerTimerShown || onboardingTimerShown || singlePlayerRound ) ?'moreDown' :'' } ` } >
459
- < Ad inCrazyGames = { inCrazyGames } showAdvertisementText = { false } screenH = { height } types = { [ [ 728 , 90 ] ] } centerOnOverflow = { 600 } screenW = { Math . max ( 400 , width - 450 ) } vertThresh = { 0.3 } />
459
+ < Ad inCrazyGames = { inCrazyGames } showAdvertisementText = { false } screenH = { height } types = { [ [ 320 , 50 ] ] } centerOnOverflow = { 600 } screenW = { Math . max ( 400 , width - 450 ) } vertThresh = { 0.3 } />
460
460
</ div >
461
461
) }
462
462
463
463
464
- { multiplayerState ?. gameData ?. public && (
464
+ { multiplayerState ?. gameData ?. duel && (
465
465
< div className = { `hbparent ${ isStartingDuel ? 'hb-parent' : '' } ` } >
466
466
< div className = { `${ isStartingDuel ? 'hb-bars' : '' } ` } >
467
467
< div style = { { zIndex : 1001 , position : "fixed" , top : 0 , left : 0 , pointerEvents : 'none' } }
@@ -627,7 +627,7 @@ button1Press={() =>{
627
627
}
628
628
} } />
629
629
) }
630
- < span className = { `timer duel ${ ! multiplayerTimerShown ? '' : 'shown' } ${ multiplayerState ?. gameData ?. public ? 'duel' : '' } ` } >
630
+ < span className = { `timer duel ${ ! multiplayerTimerShown ? '' : 'shown' } ${ multiplayerState ?. gameData ?. duel ? 'duel' : '' } ` } >
631
631
632
632
{ /* Round #{multiplayerState?.gameData?.curRound} / {multiplayerState?.gameData?.rounds} - {timeToNextMultiplayerEvt}s */ }
633
633
{ text ( "roundTimer" , { r :multiplayerState ?. gameData ?. curRound , mr : multiplayerState ?. gameData ?. rounds , t : timeToNextMultiplayerEvt } ) }
@@ -651,21 +651,17 @@ button1Press={() =>{
651
651
)
652
652
}
653
653
654
- { multiplayerState && multiplayerState . inGame && ! multiplayerState ?. gameData ?. public && multiplayerState ?. gameData ?. state === 'getready' && multiplayerState ?. gameData ?. curRound === 1 && (
654
+ { multiplayerState && multiplayerState . inGame && ! multiplayerState ?. gameData ?. duel && multiplayerState ?. gameData ?. state === 'getready' && multiplayerState ?. gameData ?. curRound === 1 && (
655
655
< BannerText text = {
656
656
text ( "gameStartingIn" , { t :timeToNextMultiplayerEvt } )
657
657
} shown = { true } />
658
658
) }
659
659
660
660
661
- { multiplayerState && multiplayerState . inGame && ! multiplayerState ?. gameData ?. public && ( ( multiplayerState ?. gameData ?. state === 'getready' && timeToNextMultiplayerEvt < 5 && multiplayerState ?. gameData ?. curRound !== 1 && multiplayerState ?. gameData ?. curRound <= multiplayerState ?. gameData ?. rounds ) || ( multiplayerState ?. gameData ?. state === "end" ) ) && (
661
+ { multiplayerState && multiplayerState . inGame && ! multiplayerState ?. gameData ?. duel && ( ( multiplayerState ?. gameData ?. state === 'getready' && timeToNextMultiplayerEvt < 5 && multiplayerState ?. gameData ?. curRound !== 1 && multiplayerState ?. gameData ?. curRound <= multiplayerState ?. gameData ?. rounds ) || ( multiplayerState ?. gameData ?. state === "end" ) ) && (
662
662
< PlayerList multiplayerState = { multiplayerState } playAgain = { ( ) => {
663
-
664
-
665
- backBtnPressed ( true )
666
-
663
+ backBtnPressed ( true , "unranked" )
667
664
} } backBtn = { ( ) => {
668
-
669
665
backBtnPressed ( )
670
666
} } />
671
667
) }
0 commit comments