Place doors on the level
Pick a random subset of cells on the level that have a wall on two opposite sides and are clear on the other two sides, and place closed, unlocked doors on those cells.
This commit is contained in:
		
							parent
							
								
									e76567b9e7
								
							
						
					
					
						commit
						dcf44f29f5
					
				
					 4 changed files with 62 additions and 17 deletions
				
			
		|  | @ -90,11 +90,7 @@ initLevel = do | |||
|     generateLevel SCaveAutomata CaveAutomata.defaultParams | ||||
|     $ Dimensions 80 80 | ||||
| 
 | ||||
|   entities <>= (SomeEntity <$> level ^. levelWalls) | ||||
|   entities <>= (SomeEntity <$> level ^. levelItems) | ||||
|   entities <>= (SomeEntity <$> level ^. levelCreatures) | ||||
|   entities <>= (SomeEntity <$> level ^. levelTutorialMessage) | ||||
| 
 | ||||
|   entities <>= levelToEntityMap level | ||||
|   characterPosition .= level ^. levelCharacterPosition | ||||
| 
 | ||||
| -------------------------------------------------------------------------------- | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue