Allow diff files to be created from the command line
This commit is contained in:
		
							parent
							
								
									74c7eca301
								
							
						
					
					
						commit
						74b1688427
					
				|  | @ -274,6 +274,9 @@ def parse_arguments(argv, no_defaults=False): | ||||||
|     parser.add_argument('--outputpath') |     parser.add_argument('--outputpath') | ||||||
|     parser.add_argument('--race', default=defval(False), action='store_true') |     parser.add_argument('--race', default=defval(False), action='store_true') | ||||||
|     parser.add_argument('--outputname') |     parser.add_argument('--outputname') | ||||||
|  |     parser.add_argument('--create_diff', default=defval(False), action='store_true', help='''\ | ||||||
|  |     create a binary patch file from which the randomized rom can be recreated using MultiClient. | ||||||
|  |     Does not work with jsonout.''') | ||||||
| 
 | 
 | ||||||
|     if multiargs.multi: |     if multiargs.multi: | ||||||
|         for player in range(1, multiargs.multi + 1): |         for player in range(1, multiargs.multi + 1): | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								Main.py
								
								
								
								
							
							
						
						
									
										6
									
								
								Main.py
								
								
								
								
							|  | @ -218,7 +218,11 @@ def main(args, seed=None): | ||||||
|                                                                                                 'random'] else "", |                                                                                                 'random'] else "", | ||||||
|                                                                   "-nohints" if not world.hints[ |                                                                   "-nohints" if not world.hints[ | ||||||
|                                                                       player] else "")) if not args.outputname else '' |                                                                       player] else "")) if not args.outputname else '' | ||||||
|             rom.write_to_file(output_path(f'{outfilebase}{outfilepname}{outfilesuffix}.sfc')) |             rompath = output_path(f'{outfilebase}{outfilepname}{outfilesuffix}.sfc') | ||||||
|  |             rom.write_to_file(rompath) | ||||||
|  |             if args.create_diff: | ||||||
|  |                 import Patch | ||||||
|  |                 Patch.create_patch_file(rompath) | ||||||
|         return (player, team, list(rom.name)) |         return (player, team, list(rom.name)) | ||||||
| 
 | 
 | ||||||
|     if not args.suppress_rom: |     if not args.suppress_rom: | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ server_options: | ||||||
|   disable_save: null |   disable_save: null | ||||||
|   loglevel: null |   loglevel: null | ||||||
|   #disallow automatically forwarding the port that is used, then closing that port on shutdown |   #disallow automatically forwarding the port that is used, then closing that port on shutdown | ||||||
|   disable_port_forward: null |   disable_port_forward: true | ||||||
|   #Disallow !getitem. Old /getitem cannot be blocked this way |   #Disallow !getitem. Old /getitem cannot be blocked this way | ||||||
|   disable_item_cheat: null |   disable_item_cheat: null | ||||||
|   #Client hint system |   #Client hint system | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue