Fixed non-deterministic shop-sanity shuffling.
This commit is contained in:
		
							parent
							
								
									8ddb1ab614
								
							
						
					
					
						commit
						9ee5c50f88
					
				| 
						 | 
				
			
			@ -458,7 +458,10 @@ class World(object):
 | 
			
		|||
            for location in locations:
 | 
			
		||||
                if location.can_reach(state):
 | 
			
		||||
                    sphere.add(location)
 | 
			
		||||
            yield sphere
 | 
			
		||||
            sphere_list = list(sphere)
 | 
			
		||||
            sphere_list.sort(key=lambda location: location.name)
 | 
			
		||||
            self.random.shuffle(sphere_list)
 | 
			
		||||
            yield sphere_list
 | 
			
		||||
            if not sphere:
 | 
			
		||||
                if locations:
 | 
			
		||||
                    yield locations  # unreachable locations
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue