@@ -238,7 +238,7 @@ public void mapHeaderConfigAcceptsAnArchiveWithoutAnHm3wPrefix() throws Exceptio
238238 Files .write (mapWithoutHeader , original );
239239
240240 Method applyMapHeader = ProjectConfigBuilder .class .getDeclaredMethod (
241- "applyMapHeader" , WurstProjectConfigData .class , File .class , int .class , String .class
241+ "applyMapHeader" , WurstProjectConfigData .class , File .class , int .class , String .class , int . class
242242 );
243243 applyMapHeader .setAccessible (true );
244244
@@ -253,7 +253,8 @@ public void mapHeaderConfigAcceptsAnArchiveWithoutAnHm3wPrefix() throws Exceptio
253253 ),
254254 mapWithoutHeader .toFile (),
255255 3 ,
256- "Existing map"
256+ "Existing map" ,
257+ 0x1234
257258 );
258259
259260 assertEquals (Files .readAllBytes (mapWithoutHeader )[0 ], (byte ) 'H' );
@@ -272,10 +273,10 @@ public void mapHeaderConfigDoesNotReadAnArchiveWhenNothingNeedsChanging() throws
272273 Files .write (mapWithoutHeader , original );
273274
274275 Method applyMapHeader = ProjectConfigBuilder .class .getDeclaredMethod (
275- "applyMapHeader" , WurstProjectConfigData .class , File .class , int .class , String .class
276+ "applyMapHeader" , WurstProjectConfigData .class , File .class , int .class , String .class , int . class
276277 );
277278 applyMapHeader .setAccessible (true );
278- applyMapHeader .invoke (null , WurstProjectConfigData .empty (), mapWithoutHeader .toFile (), 0 , null );
279+ applyMapHeader .invoke (null , WurstProjectConfigData .empty (), mapWithoutHeader .toFile (), 0 , null , 0 );
279280
280281 assertEquals (Files .readAllBytes (mapWithoutHeader ), original );
281282 }
@@ -291,7 +292,7 @@ public void mapHeaderConfigPreservesExistingMapNameWhenOnlyPlayersChange() throw
291292 Files .write (mapWithoutHeader , original );
292293
293294 Method applyMapHeader = ProjectConfigBuilder .class .getDeclaredMethod (
294- "applyMapHeader" , WurstProjectConfigData .class , File .class , int .class , String .class
295+ "applyMapHeader" , WurstProjectConfigData .class , File .class , int .class , String .class , int . class
295296 );
296297 applyMapHeader .setAccessible (true );
297298
@@ -310,11 +311,13 @@ public void mapHeaderConfigPreservesExistingMapNameWhenOnlyPlayersChange() throw
310311 ),
311312 mapWithoutHeader .toFile (),
312313 4 ,
313- "Existing map"
314+ "Existing map" ,
315+ 0x1234
314316 );
315317
316318 byte [] result = Files .readAllBytes (mapWithoutHeader );
317319 assertEquals (MapHeader .ofFile (mapWithoutHeader .toFile ()).getMaxPlayersCount (), 1 );
320+ assertEquals (MapHeader .ofFile (mapWithoutHeader .toFile ()).getFlags (), 0x1234 );
318321 assertTrue (new String (result , StandardCharsets .UTF_8 ).contains ("Existing map" ));
319322 }
320323
0 commit comments