@@ -132,18 +132,18 @@ export function loadCustomThemeFromUrl(getOverride?: string): void {
132132 }
133133}
134134
135- const testSettingsSchema = z . tuple ( [
136- ModeSchema . nullable ( ) , // Replaces z.union([ModeSchema, z.null()])
135+ const TestSettingsSchema = z . tuple ( [
136+ ModeSchema . nullable ( ) ,
137137 Mode2Schema . nullable ( ) ,
138138 CustomText . CustomTextSettingsSchema . nullable ( ) ,
139- z . boolean ( ) . nullable ( ) ,
140- z . boolean ( ) . nullable ( ) ,
141- z . string ( ) . nullable ( ) ,
139+ z . boolean ( ) . nullable ( ) , //punctuation
140+ z . boolean ( ) . nullable ( ) , //numbers
141+ z . string ( ) . nullable ( ) , //language
142142 DifficultySchema . nullable ( ) ,
143- z . string ( ) . nullable ( ) ,
143+ z . string ( ) . nullable ( ) , //funbox
144144] ) ;
145145
146- type SharedTestSettings = z . infer < typeof testSettingsSchema > ;
146+ type SharedTestSettings = z . infer < typeof TestSettingsSchema > ;
147147
148148export function loadTestSettingsFromUrl ( getOverride ?: string ) : void {
149149 const getValue = Misc . findGetParameter ( "testSettings" , getOverride ) ;
@@ -152,7 +152,7 @@ export function loadTestSettingsFromUrl(getOverride?: string): void {
152152 let de : SharedTestSettings ;
153153 try {
154154 const decompressed = decompressFromURI ( getValue ) ?? "" ;
155- const parsed = parseJsonWithSchema ( decompressed , testSettingsSchema ) ;
155+ const parsed = parseJsonWithSchema ( decompressed , TestSettingsSchema ) ;
156156 de = parsed as SharedTestSettings ; // Assign after refinement
157157 } catch ( e ) {
158158 console . error ( "Failed to parse test settings:" , e ) ;
0 commit comments