Fix bug regarding silent failed plando.
This commit is contained in:
		
							parent
							
								
									ae687e5bae
								
							
						
					
					
						commit
						48812ad296
					
				| 
						 | 
					@ -561,6 +561,7 @@ def roll_settings(weights, plando_options: typing.Set[str] = frozenset(("bosses"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ret.plando_items = []
 | 
					    ret.plando_items = []
 | 
				
			||||||
    if "items" in plando_options:
 | 
					    if "items" in plando_options:
 | 
				
			||||||
 | 
					        default_placement = PlandoItem(item="", location="")
 | 
				
			||||||
        def add_plando_item(item: str, location: str):
 | 
					        def add_plando_item(item: str, location: str):
 | 
				
			||||||
            if item not in item_table:
 | 
					            if item not in item_table:
 | 
				
			||||||
                raise Exception(f"Could not plando item {item} as the item was not recognized")
 | 
					                raise Exception(f"Could not plando item {item} as the item was not recognized")
 | 
				
			||||||
| 
						 | 
					@ -571,9 +572,9 @@ def roll_settings(weights, plando_options: typing.Set[str] = frozenset(("bosses"
 | 
				
			||||||
        options = weights.get("plando_items", [])
 | 
					        options = weights.get("plando_items", [])
 | 
				
			||||||
        for placement in options:
 | 
					        for placement in options:
 | 
				
			||||||
            if roll_percentage(get_choice("percentage", placement, 100)):
 | 
					            if roll_percentage(get_choice("percentage", placement, 100)):
 | 
				
			||||||
                from_pool = get_choice("from_pool", placement, True)
 | 
					                from_pool = get_choice("from_pool", placement, default_placement.from_pool)
 | 
				
			||||||
                location_world = get_choice("world", placement, False)
 | 
					                location_world = get_choice("world", placement, default_placement.world)
 | 
				
			||||||
                force = get_choice("force", placement, False)
 | 
					                force = get_choice("force", placement, default_placement.force)
 | 
				
			||||||
                if "items" in placement and "locations" in placement:
 | 
					                if "items" in placement and "locations" in placement:
 | 
				
			||||||
                    items = placement["items"]
 | 
					                    items = placement["items"]
 | 
				
			||||||
                    locations = placement["locations"]
 | 
					                    locations = placement["locations"]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue