| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | import argparse | 
					
						
							|  |  |  | import json | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-13 03:58:03 -04:00
										 |  |  | from ..bases import setup_solo_multiworld | 
					
						
							| 
									
										
										
										
											2025-04-10 14:34:21 -04:00
										 |  |  | from ..options.presets import allsanity_mods_6_x_x_exclude_disabled | 
					
						
							| 
									
										
										
										
											2024-07-26 05:33:14 -04:00
										 |  |  | from ...options import FarmType, EntranceRandomization | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | if __name__ == "__main__": | 
					
						
							|  |  |  |     parser = argparse.ArgumentParser() | 
					
						
							|  |  |  |     parser.add_argument('--seed', help='Define seed number to generate.', type=int, required=True) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     args = parser.parse_args() | 
					
						
							|  |  |  |     seed = args.seed | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-10 14:34:21 -04:00
										 |  |  |     options = allsanity_mods_6_x_x_exclude_disabled() | 
					
						
							| 
									
										
										
										
											2024-07-26 05:33:14 -04:00
										 |  |  |     options[FarmType.internal_name] = FarmType.option_standard | 
					
						
							|  |  |  |     options[EntranceRandomization.internal_name] = EntranceRandomization.option_buildings | 
					
						
							|  |  |  |     multi_world = setup_solo_multiworld(options, seed=seed) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-26 05:33:14 -04:00
										 |  |  |     world = multi_world.worlds[1] | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     output = { | 
					
						
							|  |  |  |         "bundles": { | 
					
						
							|  |  |  |             bundle_room.name: { | 
					
						
							|  |  |  |                 bundle.name: str(bundle.items) | 
					
						
							|  |  |  |                 for bundle in bundle_room.bundles | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-07-26 05:33:14 -04:00
										 |  |  |             for bundle_room in world.modified_bundles | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         }, | 
					
						
							|  |  |  |         "items": [item.name for item in multi_world.get_items()], | 
					
						
							| 
									
										
										
										
											2024-07-26 05:33:14 -04:00
										 |  |  |         "location_rules": {location.name: repr(location.access_rule) for location in multi_world.get_locations(1)}, | 
					
						
							|  |  |  |         "slot_data": world.fill_slot_data() | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     print(json.dumps(output)) | 
					
						
							|  |  |  | else: | 
					
						
							|  |  |  |     raise RuntimeError("Do not import this file, execute it in different python session so the PYTHONHASHSEED is different..") |