More fixes to non_local_items
This commit is contained in:
		
							parent
							
								
									25f0a5956c
								
							
						
					
					
						commit
						4370447adc
					
				
							
								
								
									
										2
									
								
								Main.py
								
								
								
								
							
							
						
						
									
										2
									
								
								Main.py
								
								
								
								
							| 
						 | 
				
			
			@ -113,7 +113,7 @@ def main(args, seed=None):
 | 
			
		|||
        # item in item_table gets checked in mystery, but not CLI - so we double-check here
 | 
			
		||||
        world.local_items[player] = {item.strip() for item in args.local_items[player].split(',') if
 | 
			
		||||
                                     item.strip() in item_table}
 | 
			
		||||
        world.non_local_items[player] = {item.strip() for item in args.local_items[player].split(',') if
 | 
			
		||||
        world.non_local_items[player] = {item.strip() for item in args.non_local_items[player].split(',') if
 | 
			
		||||
                                         item.strip() in item_table}
 | 
			
		||||
        # items can't be both local and non-local, prefer local
 | 
			
		||||
        world.non_local_items[player] -= world.local_items[player]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -497,7 +497,7 @@ def roll_settings(weights):
 | 
			
		|||
            if item in item_table:
 | 
			
		||||
                ret.non_local_items.add(item)
 | 
			
		||||
            else:
 | 
			
		||||
                raise Exception(f"Could not force item {item} to be world-local, as it was not recognized.")
 | 
			
		||||
                raise Exception(f"Could not force item {item} to be world-non-local, as it was not recognized.")
 | 
			
		||||
 | 
			
		||||
    ret.non_local_items = ",".join(ret.non_local_items)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue