 2af510328e
			
		
	
	2af510328e
	
	
	
		
			
			* rename references to `Multiworld` in core to `multiworld` instead of `world` * fix smz3 * fix oot * fix low hanging fruit * revert mysteriously broken spacing in world api.md * fix more randomly broken spacing * hate * that better be all of it * begrudgingly move over smw * ._. * missed some worlds * this is getting tedious now * Missed some self.world definitions Co-authored-by: espeon65536 <espeon65536@gmail.com> Co-authored-by: Zach Parks <zach@alliware.com>
		
			
				
	
	
		
			22 lines
		
	
	
		
			721 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			721 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from argparse import Namespace
 | |
| 
 | |
| from BaseClasses import MultiWorld
 | |
| from worlds.AutoWorld import call_all
 | |
| 
 | |
| gen_steps = ["generate_early", "create_regions", "create_items", "set_rules", "generate_basic", "pre_fill"]
 | |
| 
 | |
| 
 | |
| def setup_default_world(world_type) -> MultiWorld:
 | |
|     multiworld = MultiWorld(1)
 | |
|     multiworld.game[1] = world_type.game
 | |
|     multiworld.player_name = {1: "Tester"}
 | |
|     multiworld.set_seed()
 | |
|     args = Namespace()
 | |
|     for name, option in world_type.option_definitions.items():
 | |
|         setattr(args, name, {1: option.from_any(option.default)})
 | |
|     multiworld.set_options(args)
 | |
|     multiworld.set_default_common_options()
 | |
|     for step in gen_steps:
 | |
|         call_all(multiworld, step)
 | |
|     return multiworld
 |